diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/i2d_dhp.c')
-rw-r--r-- | src/lib/libcrypto/asn1/i2d_dhp.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libcrypto/asn1/i2d_dhp.c b/src/lib/libcrypto/asn1/i2d_dhp.c index a454025ce3..fdda4ec41b 100644 --- a/src/lib/libcrypto/asn1/i2d_dhp.c +++ b/src/lib/libcrypto/asn1/i2d_dhp.c | |||
@@ -56,20 +56,14 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef NO_DH | ||
59 | #include <stdio.h> | 60 | #include <stdio.h> |
60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
61 | #include "bn.h" | 62 | #include <openssl/bn.h> |
62 | #include "asn1_mac.h" | 63 | #include <openssl/asn1_mac.h> |
63 | #include "dh.h" | 64 | #include <openssl/dh.h> |
64 | 65 | ||
65 | /* | 66 | int i2d_DHparams(DH *a, unsigned char **pp) |
66 | * ASN1err(ASN1_F_D2I_DHPARAMS,ASN1_R_LENGTH_MISMATCH); | ||
67 | * ASN1err(ASN1_F_X509_DHPARAMS_NEW,ASN1_R_LENGTH_MISMATCH); | ||
68 | */ | ||
69 | |||
70 | int i2d_DHparams(a,pp) | ||
71 | DH *a; | ||
72 | unsigned char **pp; | ||
73 | { | 67 | { |
74 | BIGNUM *num[3]; | 68 | BIGNUM *num[3]; |
75 | ASN1_INTEGER bs; | 69 | ASN1_INTEGER bs; |
@@ -100,7 +94,12 @@ unsigned char **pp; | |||
100 | } | 94 | } |
101 | 95 | ||
102 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | 96 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); |
103 | if (pp == NULL) return(t); | 97 | if (pp == NULL) |
98 | { | ||
99 | if (num[2] != NULL) | ||
100 | BN_free(num[2]); | ||
101 | return(t); | ||
102 | } | ||
104 | 103 | ||
105 | p= *pp; | 104 | p= *pp; |
106 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | 105 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); |
@@ -126,3 +125,4 @@ err: | |||
126 | *pp=p; | 125 | *pp=p; |
127 | return(ret); | 126 | return(ret); |
128 | } | 127 | } |
128 | #endif | ||