update master-with-bazel from master branch
This commit is contained in:
@@ -2828,6 +2828,12 @@ struct EMBED_X509_ALGOR {
|
||||
STACK_OF(X509_ALGOR) *seq;
|
||||
};
|
||||
|
||||
struct EMBED_X509_EXTENSION {
|
||||
X509_EXTENSION *simple;
|
||||
X509_EXTENSION *opt;
|
||||
STACK_OF(X509_EXTENSION) *seq;
|
||||
};
|
||||
|
||||
struct EMBED_X509_NAME {
|
||||
X509_NAME *simple;
|
||||
X509_NAME *opt;
|
||||
@@ -2856,6 +2862,14 @@ ASN1_SEQUENCE(EMBED_X509_NAME) = {
|
||||
} ASN1_SEQUENCE_END(EMBED_X509_NAME)
|
||||
IMPLEMENT_ASN1_FUNCTIONS(EMBED_X509_NAME)
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(EMBED_X509_EXTENSION)
|
||||
ASN1_SEQUENCE(EMBED_X509_EXTENSION) = {
|
||||
ASN1_SIMPLE(EMBED_X509_EXTENSION, simple, X509_EXTENSION),
|
||||
ASN1_EXP_OPT(EMBED_X509_EXTENSION, opt, X509_EXTENSION, 0),
|
||||
ASN1_IMP_SEQUENCE_OF_OPT(EMBED_X509_EXTENSION, seq, X509_EXTENSION, 1),
|
||||
} ASN1_SEQUENCE_END(EMBED_X509_EXTENSION)
|
||||
IMPLEMENT_ASN1_FUNCTIONS(EMBED_X509_EXTENSION)
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(EMBED_X509)
|
||||
ASN1_SEQUENCE(EMBED_X509) = {
|
||||
ASN1_SIMPLE(EMBED_X509, simple, X509),
|
||||
@@ -2940,6 +2954,14 @@ TEST(ASN1Test, EmbedTypes) {
|
||||
EMBED_X509_NAME_free, d2i_EMBED_X509_NAME, i2d_EMBED_X509_NAME,
|
||||
sk_X509_NAME_num, sk_X509_NAME_value);
|
||||
|
||||
static const uint8_t kTestExtension[] = {0x30, 0x0c, 0x06, 0x03, 0x55,
|
||||
0x1d, 0x13, 0x04, 0x05, 0x30,
|
||||
0x03, 0x01, 0x01, 0xf};
|
||||
TestEmbedType(kTestExtension, i2d_X509_EXTENSION, EMBED_X509_EXTENSION_new,
|
||||
EMBED_X509_EXTENSION_free, d2i_EMBED_X509_EXTENSION,
|
||||
i2d_EMBED_X509_EXTENSION, sk_X509_EXTENSION_num,
|
||||
sk_X509_EXTENSION_value);
|
||||
|
||||
static const uint8_t kTestCert[] = {
|
||||
0x30, 0x82, 0x01, 0xcf, 0x30, 0x82, 0x01, 0x76, 0xa0, 0x03, 0x02, 0x01,
|
||||
0x02, 0x02, 0x09, 0x00, 0xd9, 0x4c, 0x04, 0xda, 0x49, 0x7d, 0xbf, 0xeb,
|
||||
|
||||
@@ -1630,6 +1630,10 @@ OPENSSL_EXPORT const ASN1_BIT_STRING *X509_PUBKEY_get0_public_key(
|
||||
// determined by the extension type. This library represents extensions with the
|
||||
// |X509_EXTENSION| type.
|
||||
|
||||
// X509_EXTENSION is an |ASN1_ITEM| whose ASN.1 type is X.509 Extension (RFC
|
||||
// 5280) and C type is |X509_EXTENSION*|.
|
||||
DECLARE_ASN1_ITEM(X509_EXTENSION)
|
||||
|
||||
// X509_EXTENSION_new returns a newly-allocated, empty |X509_EXTENSION| object
|
||||
// or NULL on error.
|
||||
OPENSSL_EXPORT X509_EXTENSION *X509_EXTENSION_new(void);
|
||||
|
||||
Reference in New Issue
Block a user