blob: f6c0e5916afa60020da307d22bc9d0a750e89f53 [file] [log] [blame]
/*
*
* Copyright (c) 2013-2017 Nest Labs, Inc.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* This file implements global symbols for Nest Weave public key
* infrastructure (PKI) certificates.
*
*/
#include <Weave/Core/WeaveCore.h>
#include <Weave/Profiles/security/WeaveSecurity.h>
#include "NestCerts.h"
namespace nl {
namespace NestCerts {
// ----- Nest Production Certificates -----
namespace Production {
// Public information for the Nest Production Root certificate
namespace Root {
// Certificate (weave format).
extern const uint8_t Cert[] =
{
0xd5, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x64, 0xf3, 0xc7, 0x25, 0x80, 0x18,
0xcc, 0x69, 0x24, 0x02, 0x05, 0x37, 0x03, 0x27, 0x13, 0x01, 0x00, 0x00, 0x00, 0xee, 0x30, 0xb4,
0x18, 0x18, 0x26, 0x04, 0x45, 0x48, 0x16, 0x1a, 0x26, 0x05, 0x45, 0x06, 0xfb, 0x49, 0x37, 0x06,
0x27, 0x13, 0x01, 0x00, 0x00, 0x00, 0xee, 0x30, 0xb4, 0x18, 0x18, 0x24, 0x07, 0x02, 0x26, 0x08,
0x25, 0x00, 0x5a, 0x23, 0x30, 0x0a, 0x39, 0x04, 0x14, 0x9b, 0x40, 0xad, 0x5a, 0x01, 0x8f, 0x44,
0xfe, 0x7e, 0x92, 0x99, 0x79, 0x5d, 0x53, 0x05, 0x3d, 0x28, 0xb1, 0xd9, 0x52, 0x53, 0x1d, 0x45,
0x44, 0xad, 0x59, 0x4d, 0xcb, 0x25, 0x35, 0xf0, 0xd0, 0x48, 0xc5, 0x30, 0x88, 0x6d, 0xe2, 0x1f,
0x9b, 0x50, 0x8d, 0xe1, 0xa1, 0xaf, 0x16, 0xdf, 0xaf, 0x49, 0x29, 0x84, 0x6b, 0x61, 0x44, 0x10,
0x35, 0x83, 0x29, 0x01, 0x29, 0x02, 0x18, 0x35, 0x82, 0x29, 0x01, 0x24, 0x02, 0x60, 0x18, 0x35,
0x81, 0x30, 0x02, 0x08, 0x43, 0x34, 0xf7, 0x12, 0xdf, 0x5f, 0x91, 0xcf, 0x18, 0x35, 0x80, 0x30,
0x02, 0x08, 0x43, 0x34, 0xf7, 0x12, 0xdf, 0x5f, 0x91, 0xcf, 0x18, 0x35, 0x0c, 0x30, 0x01, 0x1c,
0x4e, 0x98, 0xef, 0x90, 0x12, 0x97, 0xad, 0xd4, 0xea, 0x02, 0x29, 0x3f, 0xe2, 0xbb, 0xed, 0xd2,
0x3a, 0xfe, 0x3d, 0x34, 0x28, 0xae, 0x6b, 0xc8, 0x46, 0xad, 0x02, 0x78, 0x30, 0x02, 0x1c, 0x50,
0x6d, 0x7d, 0x10, 0xb3, 0x43, 0xbd, 0x87, 0x55, 0xfe, 0x08, 0x7a, 0xa4, 0x2f, 0xb4, 0xb8, 0x08,
0xd9, 0x0a, 0x30, 0xd0, 0x7a, 0x60, 0x4a, 0x0d, 0xab, 0x95, 0xc2, 0x18, 0x18,
};
extern const uint16_t CertLength = sizeof(Cert);
// Public Key (uncompressed X9.62 format)
extern const uint8_t PublicKey[] =
{
0x04, 0x14, 0x9b, 0x40, 0xad, 0x5a, 0x01, 0x8f, 0x44, 0xfe, 0x7e, 0x92, 0x99, 0x79, 0x5d, 0x53,
0x05, 0x3d, 0x28, 0xb1, 0xd9, 0x52, 0x53, 0x1d, 0x45, 0x44, 0xad, 0x59, 0x4d, 0xcb, 0x25, 0x35,
0xf0, 0xd0, 0x48, 0xc5, 0x30, 0x88, 0x6d, 0xe2, 0x1f, 0x9b, 0x50, 0x8d, 0xe1, 0xa1, 0xaf, 0x16,
0xdf, 0xaf, 0x49, 0x29, 0x84, 0x6b, 0x61, 0x44, 0x10
};
extern const uint16_t PublicKeyLength = sizeof(PublicKey);
// Public Key Id ("truncated" SHA-1 hash form, per RFC5280).
extern const uint8_t SubjectKeyId[] =
{
0x43, 0x34, 0xF7, 0x12, 0xDF, 0x5F, 0x91, 0xCF
};
extern const uint16_t SubjectKeyIdLength = sizeof(SubjectKeyId);
// Weave Curve Id
extern const uint32_t CurveOID = nl::Weave::Profiles::Security::kWeaveCurveId_secp224r1;
// CA Certificate Id
extern const uint64_t CAId = 0x18B430EE00000001ULL;
}
// Public information for the Nest Production Device CA
namespace DeviceCA {
// Certificate (weave format).
extern const uint8_t Cert[] =
{
0xd5, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x22, 0x36, 0xa9, 0x86, 0x2f, 0x67,
0x6a, 0x6d, 0x24, 0x02, 0x05, 0x37, 0x03, 0x27, 0x13, 0x01, 0x00, 0x00, 0x00, 0xee, 0x30, 0xb4,
0x18, 0x18, 0x26, 0x04, 0x95, 0x49, 0x16, 0x1a, 0x26, 0x05, 0x95, 0x07, 0xfb, 0x49, 0x37, 0x06,
0x27, 0x13, 0x02, 0x00, 0x00, 0x00, 0xee, 0x30, 0xb4, 0x18, 0x18, 0x24, 0x07, 0x02, 0x26, 0x08,
0x25, 0x00, 0x5a, 0x23, 0x30, 0x0a, 0x39, 0x04, 0x3d, 0x4f, 0x24, 0xd8, 0xfc, 0x49, 0xdb, 0x8c,
0xfe, 0x83, 0x44, 0xf5, 0x78, 0xec, 0x4a, 0x3a, 0x90, 0xa3, 0x43, 0x9c, 0xcb, 0xb9, 0x72, 0xbb,
0x24, 0x84, 0x91, 0x19, 0x1b, 0xf8, 0x6b, 0x98, 0x64, 0xb7, 0x7f, 0x8d, 0xe5, 0x7f, 0x10, 0xef,
0x1d, 0x16, 0x9b, 0xa0, 0xfd, 0xf7, 0xb1, 0x8c, 0x8d, 0x17, 0xae, 0xdc, 0xa4, 0x8d, 0xff, 0xbd,
0x35, 0x83, 0x29, 0x01, 0x29, 0x02, 0x18, 0x35, 0x82, 0x29, 0x01, 0x24, 0x02, 0x60, 0x18, 0x35,
0x81, 0x30, 0x02, 0x08, 0x4d, 0xc1, 0xda, 0x2d, 0x62, 0x19, 0x4b, 0xe0, 0x18, 0x35, 0x80, 0x30,
0x02, 0x08, 0x43, 0x34, 0xf7, 0x12, 0xdf, 0x5f, 0x91, 0xcf, 0x18, 0x35, 0x0c, 0x30, 0x01, 0x1c,
0x53, 0x0f, 0x10, 0xdd, 0xdf, 0x37, 0xa1, 0x0d, 0x1b, 0x79, 0x51, 0xc8, 0x9b, 0xd6, 0x6d, 0x05,
0xa5, 0x1b, 0xd9, 0xcc, 0x40, 0x1d, 0xcf, 0xe4, 0xc5, 0x79, 0x7b, 0x7d, 0x30, 0x02, 0x1c, 0x36,
0xad, 0x50, 0x43, 0xaa, 0xff, 0x88, 0xfc, 0x9c, 0x67, 0xe2, 0x14, 0x1a, 0xfe, 0xa1, 0x8c, 0x59,
0xd5, 0x24, 0xc1, 0x33, 0xc2, 0x75, 0xe2, 0xbe, 0xa4, 0x08, 0x7b, 0x18, 0x18,
};
extern const uint16_t CertLength = sizeof(Cert);
// Public Key (uncompressed X9.62 format)
extern const uint8_t PublicKey[] =
{
0x04, 0x3d, 0x4f, 0x24, 0xd8, 0xfc, 0x49, 0xdb, 0x8c, 0xfe, 0x83, 0x44, 0xf5, 0x78, 0xec, 0x4a,
0x3a, 0x90, 0xa3, 0x43, 0x9c, 0xcb, 0xb9, 0x72, 0xbb, 0x24, 0x84, 0x91, 0x19, 0x1b, 0xf8, 0x6b,
0x98, 0x64, 0xb7, 0x7f, 0x8d, 0xe5, 0x7f, 0x10, 0xef, 0x1d, 0x16, 0x9b, 0xa0, 0xfd, 0xf7, 0xb1,
0x8c, 0x8d, 0x17, 0xae, 0xdc, 0xa4, 0x8d, 0xff, 0xbd
};
extern const uint16_t PublicKeyLength = sizeof(PublicKey);
// Public Key Id ("truncated" SHA-1 hash form, per RFC5280).
extern const uint8_t SubjectKeyId[] =
{
0x4D, 0xC1, 0xDA, 0x2D, 0x62, 0x19, 0x4B, 0xE0
};
extern const uint16_t SubjectKeyIdLength = sizeof(SubjectKeyId);
// Weave Curve Id
extern const uint32_t CurveOID = nl::Weave::Profiles::Security::kWeaveCurveId_secp224r1;
// CA Certificate Id
extern const uint64_t CAId = 0x18B430EE00000002ULL;
}
} // namespace Production
// ----- Nest Development Certificates -----
namespace Development {
// Public information for the Nest Development Root certificate
namespace Root {
// Certificate (weave format).
extern const uint8_t Cert[] =
{
0xd5, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x07, 0xd6, 0x9d, 0xdd, 0xfc, 0x13,
0xe5, 0x1e, 0x24, 0x02, 0x05, 0x37, 0x03, 0x27, 0x13, 0x01, 0x00, 0x00, 0xee, 0xee, 0x30, 0xb4,
0x18, 0x18, 0x26, 0x04, 0x00, 0x11, 0xa8, 0x19, 0x26, 0x05, 0xff, 0xff, 0xd2, 0x2c, 0x37, 0x06,
0x27, 0x13, 0x01, 0x00, 0x00, 0xee, 0xee, 0x30, 0xb4, 0x18, 0x18, 0x24, 0x07, 0x02, 0x26, 0x08,
0x15, 0x00, 0x5a, 0x23, 0x30, 0x0a, 0x31, 0x04, 0x78, 0x52, 0xe2, 0x9c, 0x92, 0xba, 0x70, 0x19,
0x58, 0x46, 0x6d, 0xae, 0x18, 0x72, 0x4a, 0xfb, 0x43, 0x0d, 0xf6, 0x07, 0x29, 0x33, 0x0d, 0x61,
0x55, 0xe5, 0x65, 0x46, 0x8e, 0xba, 0x0d, 0xa5, 0x3f, 0xb5, 0x17, 0xc0, 0x47, 0x64, 0x44, 0x02,
0x18, 0x4f, 0xa8, 0x11, 0x24, 0x50, 0xd4, 0x7b, 0x35, 0x83, 0x29, 0x01, 0x29, 0x02, 0x18, 0x35,
0x82, 0x29, 0x01, 0x24, 0x02, 0x60, 0x18, 0x35, 0x81, 0x30, 0x02, 0x08, 0x42, 0x0c, 0xac, 0xf6,
0xb4, 0x64, 0x71, 0xe6, 0x18, 0x35, 0x80, 0x30, 0x02, 0x08, 0x42, 0x0c, 0xac, 0xf6, 0xb4, 0x64,
0x71, 0xe6, 0x18, 0x35, 0x0c, 0x30, 0x01, 0x19, 0x00, 0x86, 0xe0, 0xfd, 0x04, 0xc4, 0xe4, 0x35,
0x03, 0x2d, 0x59, 0xd1, 0x2b, 0x55, 0xec, 0x12, 0x35, 0x45, 0x4b, 0x43, 0x60, 0x88, 0x25, 0x28,
0x89, 0x30, 0x02, 0x18, 0x0c, 0x80, 0x95, 0xdb, 0x26, 0x70, 0x71, 0xd7, 0x82, 0xa2, 0xf4, 0x64,
0x2b, 0xe0, 0xd1, 0x2a, 0x69, 0x02, 0x75, 0x54, 0x4f, 0x53, 0x83, 0x86, 0x18, 0x18,
};
extern const uint16_t CertLength = sizeof(Cert);
// Public Key (uncompressed X9.62 format)
extern const uint8_t PublicKey[] =
{
0x04, 0x78, 0x52, 0xe2, 0x9c, 0x92, 0xba, 0x70, 0x19, 0x58, 0x46, 0x6d, 0xae, 0x18, 0x72, 0x4a,
0xfb, 0x43, 0x0d, 0xf6, 0x07, 0x29, 0x33, 0x0d, 0x61, 0x55, 0xe5, 0x65, 0x46, 0x8e, 0xba, 0x0d,
0xa5, 0x3f, 0xb5, 0x17, 0xc0, 0x47, 0x64, 0x44, 0x02, 0x18, 0x4f, 0xa8, 0x11, 0x24, 0x50, 0xd4,
0x7b
};
extern const uint16_t PublicKeyLength = sizeof(PublicKey);
// Public Key Id ("truncated" SHA-1 hash form, per RFC5280).
extern const uint8_t SubjectKeyId[] =
{
0x42, 0x0C, 0xAC, 0xF6, 0xB4, 0x64, 0x71, 0xE6
};
extern const uint16_t SubjectKeyIdLength = sizeof(SubjectKeyId);
// Weave Curve Id
extern const uint32_t CurveOID = nl::Weave::Profiles::Security::kWeaveCurveId_prime192v1;
// CA Certificate Id
extern const uint64_t CAId = 0x18B430EEEE000001ULL;
}
// Public information for the Nest Development Device CA
namespace DeviceCA {
// Certificate (weave format).
extern const uint8_t Cert[] =
{
0xd5, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x6a, 0x76, 0xa7, 0xb9, 0x50, 0x3c,
0x34, 0x7a, 0x24, 0x02, 0x05, 0x37, 0x03, 0x27, 0x13, 0x01, 0x00, 0x00, 0xee, 0xee, 0x30, 0xb4,
0x18, 0x18, 0x26, 0x04, 0x80, 0x62, 0xa9, 0x19, 0x26, 0x05, 0x7f, 0xde, 0x72, 0x79, 0x37, 0x06,
0x27, 0x13, 0x02, 0x00, 0x00, 0xee, 0xee, 0x30, 0xb4, 0x18, 0x18, 0x24, 0x07, 0x02, 0x26, 0x08,
0x15, 0x00, 0x5a, 0x23, 0x30, 0x0a, 0x31, 0x04, 0x3b, 0x9d, 0xc4, 0xe8, 0xca, 0xc8, 0x33, 0xa0,
0x2e, 0x7b, 0x5d, 0xb5, 0x29, 0xf4, 0xa6, 0xd5, 0xf8, 0x82, 0x26, 0x4c, 0xd2, 0xfb, 0x31, 0x21,
0xe6, 0x84, 0xa5, 0x1c, 0xc9, 0x58, 0x13, 0x72, 0x36, 0x4a, 0x05, 0xa9, 0xc6, 0x27, 0x65, 0xdd,
0x20, 0xdb, 0x30, 0xd4, 0x6b, 0xf8, 0xad, 0x31, 0x35, 0x83, 0x29, 0x01, 0x29, 0x02, 0x18, 0x35,
0x82, 0x29, 0x01, 0x24, 0x02, 0x60, 0x18, 0x35, 0x81, 0x30, 0x02, 0x08, 0x44, 0xe3, 0x40, 0x38,
0xa9, 0xd4, 0xb5, 0xa7, 0x18, 0x35, 0x80, 0x30, 0x02, 0x08, 0x42, 0x0c, 0xac, 0xf6, 0xb4, 0x64,
0x71, 0xe6, 0x18, 0x35, 0x0c, 0x30, 0x01, 0x18, 0x57, 0x63, 0xaa, 0xd5, 0x6a, 0x91, 0xce, 0x35,
0xab, 0x2a, 0x44, 0x77, 0x31, 0x3c, 0xba, 0xfc, 0x77, 0x5f, 0x3e, 0xfe, 0xcb, 0xa2, 0x65, 0x4b,
0x30, 0x02, 0x19, 0x00, 0xf4, 0x54, 0x79, 0x8c, 0xaa, 0x07, 0x13, 0x0b, 0xaf, 0xa8, 0x8f, 0xcb,
0x0b, 0x2f, 0x80, 0x8d, 0xa3, 0x57, 0xbb, 0xc7, 0xa0, 0xff, 0x54, 0xd5, 0x18, 0x18,
};
extern const uint16_t CertLength = sizeof(Cert);
// Public Key (uncompressed X9.62 format)
extern const uint8_t PublicKey[] =
{
0x04, 0x3b, 0x9d, 0xc4, 0xe8, 0xca, 0xc8, 0x33, 0xa0, 0x2e, 0x7b, 0x5d, 0xb5, 0x29, 0xf4, 0xa6,
0xd5, 0xf8, 0x82, 0x26, 0x4c, 0xd2, 0xfb, 0x31, 0x21, 0xe6, 0x84, 0xa5, 0x1c, 0xc9, 0x58, 0x13,
0x72, 0x36, 0x4a, 0x05, 0xa9, 0xc6, 0x27, 0x65, 0xdd, 0x20, 0xdb, 0x30, 0xd4, 0x6b, 0xf8, 0xad,
0x31
};
extern const uint16_t PublicKeyLength = sizeof(PublicKey);
// Subject Key Id ("truncated" SHA-1 hash form, per RFC5280).
extern const uint8_t SubjectKeyId[] =
{
0x44, 0xE3, 0x40, 0x38, 0xA9, 0xD4, 0xB5, 0xA7
};
extern const uint16_t SubjectKeyIdLength = sizeof(SubjectKeyId);
// Weave Curve Id
extern const uint32_t CurveOID = nl::Weave::Profiles::Security::kWeaveCurveId_prime192v1;
// CA Certificate Id
extern const uint64_t CAId = 0x18B430EEEE000002ULL;
}
} // namespace Development
} // namespace NestCerts
} // namespace nl