summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/x_bignum.c
diff options
context:
space:
mode:
authordjm <>2008-09-06 12:15:56 +0000
committerdjm <>2008-09-06 12:15:56 +0000
commit5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80 (patch)
treeaba68249883aa9d2361d92eef69a81d0c4961732 /src/lib/libcrypto/asn1/x_bignum.c
parentf6198d4d0ab97685dc56be2d48715ed39fcc74b9 (diff)
downloadopenbsd-5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80.tar.gz
openbsd-5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80.tar.bz2
openbsd-5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80.zip
import of OpenSSL 0.9.8h
Diffstat (limited to 'src/lib/libcrypto/asn1/x_bignum.c')
-rw-r--r--src/lib/libcrypto/asn1/x_bignum.c6
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);
72static void bn_free(ASN1_VALUE **pval, const ASN1_ITEM *it); 73static void bn_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
73 74
74static int bn_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it); 75static int bn_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it);
75static int bn_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); 76static int bn_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it);
76 77
77static ASN1_PRIMITIVE_FUNCS bignum_pf = { 78static 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
125static int bn_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it) 126static 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);