diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/x_bignum.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/x_bignum.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/x_bignum.c b/src/lib/libcrypto/asn1/x_bignum.c index 848c7a0877..869c05d931 100644 --- a/src/lib/libcrypto/asn1/x_bignum.c +++ b/src/lib/libcrypto/asn1/x_bignum.c | |||
| @@ -59,6 +59,7 @@ | |||
| 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> | ||
| 62 | 63 | ||
| 63 | /* Custom primitive type for BIGNUM handling. This reads in an ASN1_INTEGER as a | 64 | /* Custom primitive type for BIGNUM handling. This reads in an ASN1_INTEGER as a |
| 64 | * BIGNUM directly. Currently it ignores the sign which isn't a problem since all | 65 | * BIGNUM directly. Currently it ignores the sign which isn't a problem since all |
| @@ -72,7 +73,7 @@ static int bn_new(ASN1_VALUE **pval, const ASN1_ITEM *it); | |||
| 72 | static void bn_free(ASN1_VALUE **pval, const ASN1_ITEM *it); | 73 | static void bn_free(ASN1_VALUE **pval, const ASN1_ITEM *it); |
| 73 | 74 | ||
| 74 | static int bn_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it); | 75 | static int bn_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it); |
| 75 | static int bn_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); | 76 | static int bn_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); |
| 76 | 77 | ||
| 77 | static ASN1_PRIMITIVE_FUNCS bignum_pf = { | 78 | static ASN1_PRIMITIVE_FUNCS bignum_pf = { |
| 78 | NULL, 0, | 79 | NULL, 0, |
| @@ -122,7 +123,8 @@ static int bn_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN | |||
| 122 | return pad + BN_num_bytes(bn); | 123 | return pad + BN_num_bytes(bn); |
| 123 | } | 124 | } |
| 124 | 125 | ||
| 125 | static int bn_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it) | 126 | static int bn_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, |
| 127 | int utype, char *free_cont, const ASN1_ITEM *it) | ||
| 126 | { | 128 | { |
| 127 | BIGNUM *bn; | 129 | BIGNUM *bn; |
| 128 | if(!*pval) bn_new(pval, it); | 130 | if(!*pval) bn_new(pval, it); |
