diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/ameth_lib.c')
-rw-r--r-- | src/lib/libcrypto/asn1/ameth_lib.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/ameth_lib.c b/src/lib/libcrypto/asn1/ameth_lib.c index 5a581b90ea..a19e058fca 100644 --- a/src/lib/libcrypto/asn1/ameth_lib.c +++ b/src/lib/libcrypto/asn1/ameth_lib.c | |||
@@ -69,6 +69,7 @@ extern const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[]; | |||
69 | extern const EVP_PKEY_ASN1_METHOD dh_asn1_meth; | 69 | extern const EVP_PKEY_ASN1_METHOD dh_asn1_meth; |
70 | extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth; | 70 | extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth; |
71 | extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth; | 71 | extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth; |
72 | extern const EVP_PKEY_ASN1_METHOD cmac_asn1_meth; | ||
72 | 73 | ||
73 | /* Keep this sorted in type order !! */ | 74 | /* Keep this sorted in type order !! */ |
74 | static const EVP_PKEY_ASN1_METHOD *standard_methods[] = | 75 | static const EVP_PKEY_ASN1_METHOD *standard_methods[] = |
@@ -90,7 +91,8 @@ static const EVP_PKEY_ASN1_METHOD *standard_methods[] = | |||
90 | #ifndef OPENSSL_NO_EC | 91 | #ifndef OPENSSL_NO_EC |
91 | &eckey_asn1_meth, | 92 | &eckey_asn1_meth, |
92 | #endif | 93 | #endif |
93 | &hmac_asn1_meth | 94 | &hmac_asn1_meth, |
95 | &cmac_asn1_meth | ||
94 | }; | 96 | }; |
95 | 97 | ||
96 | typedef int sk_cmp_fn_type(const char * const *a, const char * const *b); | 98 | typedef int sk_cmp_fn_type(const char * const *a, const char * const *b); |
@@ -291,6 +293,8 @@ EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags, | |||
291 | if (!ameth) | 293 | if (!ameth) |
292 | return NULL; | 294 | return NULL; |
293 | 295 | ||
296 | memset(ameth, 0, sizeof(EVP_PKEY_ASN1_METHOD)); | ||
297 | |||
294 | ameth->pkey_id = id; | 298 | ameth->pkey_id = id; |
295 | ameth->pkey_base_id = id; | 299 | ameth->pkey_base_id = id; |
296 | ameth->pkey_flags = flags | ASN1_PKEY_DYNAMIC; | 300 | ameth->pkey_flags = flags | ASN1_PKEY_DYNAMIC; |
@@ -325,6 +329,9 @@ EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags, | |||
325 | ameth->old_priv_encode = 0; | 329 | ameth->old_priv_encode = 0; |
326 | ameth->old_priv_decode = 0; | 330 | ameth->old_priv_decode = 0; |
327 | 331 | ||
332 | ameth->item_verify = 0; | ||
333 | ameth->item_sign = 0; | ||
334 | |||
328 | ameth->pkey_size = 0; | 335 | ameth->pkey_size = 0; |
329 | ameth->pkey_bits = 0; | 336 | ameth->pkey_bits = 0; |
330 | 337 | ||
@@ -376,6 +383,9 @@ void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, | |||
376 | dst->pkey_free = src->pkey_free; | 383 | dst->pkey_free = src->pkey_free; |
377 | dst->pkey_ctrl = src->pkey_ctrl; | 384 | dst->pkey_ctrl = src->pkey_ctrl; |
378 | 385 | ||
386 | dst->item_sign = src->item_sign; | ||
387 | dst->item_verify = src->item_verify; | ||
388 | |||
379 | } | 389 | } |
380 | 390 | ||
381 | void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth) | 391 | void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth) |