diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/x_long.c')
-rw-r--r-- | src/lib/libcrypto/asn1/x_long.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/x_long.c b/src/lib/libcrypto/asn1/x_long.c index 0db233cb95..c5f25956cb 100644 --- a/src/lib/libcrypto/asn1/x_long.c +++ b/src/lib/libcrypto/asn1/x_long.c | |||
@@ -59,7 +59,6 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include <openssl/asn1t.h> | 61 | #include <openssl/asn1t.h> |
62 | #include <openssl/bn.h> | ||
63 | 62 | ||
64 | /* Custom primitive type for long handling. This converts between an ASN1_INTEGER | 63 | /* Custom primitive type for long handling. This converts between an ASN1_INTEGER |
65 | * and a long directly. | 64 | * and a long directly. |
@@ -70,7 +69,7 @@ static int long_new(ASN1_VALUE **pval, const ASN1_ITEM *it); | |||
70 | static void long_free(ASN1_VALUE **pval, const ASN1_ITEM *it); | 69 | static void long_free(ASN1_VALUE **pval, const ASN1_ITEM *it); |
71 | 70 | ||
72 | static int long_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it); | 71 | static int long_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it); |
73 | static int long_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); | 72 | static int long_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); |
74 | 73 | ||
75 | static ASN1_PRIMITIVE_FUNCS long_pf = { | 74 | static ASN1_PRIMITIVE_FUNCS long_pf = { |
76 | NULL, 0, | 75 | NULL, 0, |
@@ -137,14 +136,13 @@ static int long_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const A | |||
137 | return clen + pad; | 136 | return clen + pad; |
138 | } | 137 | } |
139 | 138 | ||
140 | static int long_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, | 139 | static int long_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it) |
141 | int utype, char *free_cont, const ASN1_ITEM *it) | ||
142 | { | 140 | { |
143 | int neg, i; | 141 | int neg, i; |
144 | long ltmp; | 142 | long ltmp; |
145 | unsigned long utmp = 0; | 143 | unsigned long utmp = 0; |
146 | char *cp = (char *)pval; | 144 | char *cp = (char *)pval; |
147 | if(len > (int)sizeof(long)) { | 145 | if(len > sizeof(long)) { |
148 | ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG); | 146 | ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG); |
149 | return 0; | 147 | return 0; |
150 | } | 148 | } |