diff options
Diffstat (limited to 'src/lib/libcrypto/dh/dh_asn1.c')
-rw-r--r-- | src/lib/libcrypto/dh/dh_asn1.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/lib/libcrypto/dh/dh_asn1.c b/src/lib/libcrypto/dh/dh_asn1.c index f1afe876ca..ed3a015279 100644 --- a/src/lib/libcrypto/dh/dh_asn1.c +++ b/src/lib/libcrypto/dh/dh_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_asn1.c,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ | 1 | /* $OpenBSD: dh_asn1.c,v 1.5 2014/07/09 13:26:47 miod Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -64,14 +64,15 @@ | |||
64 | #include <openssl/asn1t.h> | 64 | #include <openssl/asn1t.h> |
65 | 65 | ||
66 | /* Override the default free and new methods */ | 66 | /* Override the default free and new methods */ |
67 | static int dh_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, | 67 | static int |
68 | void *exarg) | 68 | dh_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) |
69 | { | 69 | { |
70 | if(operation == ASN1_OP_NEW_PRE) { | 70 | if (operation == ASN1_OP_NEW_PRE) { |
71 | *pval = (ASN1_VALUE *)DH_new(); | 71 | *pval = (ASN1_VALUE *)DH_new(); |
72 | if(*pval) return 2; | 72 | if (*pval) |
73 | return 2; | ||
73 | return 0; | 74 | return 0; |
74 | } else if(operation == ASN1_OP_FREE_PRE) { | 75 | } else if (operation == ASN1_OP_FREE_PRE) { |
75 | DH_free((DH *)*pval); | 76 | DH_free((DH *)*pval); |
76 | *pval = NULL; | 77 | *pval = NULL; |
77 | return 2; | 78 | return 2; |
@@ -87,7 +88,8 @@ ASN1_SEQUENCE_cb(DHparams, dh_cb) = { | |||
87 | 88 | ||
88 | IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DH, DHparams, DHparams) | 89 | IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DH, DHparams, DHparams) |
89 | 90 | ||
90 | DH *DHparams_dup(DH *dh) | 91 | DH * |
91 | { | 92 | DHparams_dup(DH *dh) |
93 | { | ||
92 | return ASN1_item_dup(ASN1_ITEM_rptr(DHparams), dh); | 94 | return ASN1_item_dup(ASN1_ITEM_rptr(DHparams), dh); |
93 | } | 95 | } |