summaryrefslogtreecommitdiff
path: root/thirdparty/openssl/crypto/asn1/x_bignum.c
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-05-27 17:50:43 +0200
committerRémi Verschelde <rverschelde@gmail.com>2017-05-27 19:08:07 +0200
commit67305d1b0a6dbcdb032d5a5a0e92122cf8f10b8d (patch)
tree3502be2b2ae57c73fa21bd7b4a20dc02aab3aa06 /thirdparty/openssl/crypto/asn1/x_bignum.c
parent996f1ae29e8d9bd2719f0dc72bfde6a8d77b1b12 (diff)
openssl: Sync with upstream 1.0.2l
Diffstat (limited to 'thirdparty/openssl/crypto/asn1/x_bignum.c')
-rw-r--r--thirdparty/openssl/crypto/asn1/x_bignum.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/thirdparty/openssl/crypto/asn1/x_bignum.c b/thirdparty/openssl/crypto/asn1/x_bignum.c
index eaf046639d..c644199c9f 100644
--- a/thirdparty/openssl/crypto/asn1/x_bignum.c
+++ b/thirdparty/openssl/crypto/asn1/x_bignum.c
@@ -78,6 +78,8 @@ static int bn_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype,
const ASN1_ITEM *it);
static int bn_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
int utype, char *free_cont, const ASN1_ITEM *it);
+static int bn_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it,
+ int indent, const ASN1_PCTX *pctx);
static ASN1_PRIMITIVE_FUNCS bignum_pf = {
NULL, 0,
@@ -85,7 +87,8 @@ static ASN1_PRIMITIVE_FUNCS bignum_pf = {
bn_free,
0,
bn_c2i,
- bn_i2c
+ bn_i2c,
+ bn_print
};
ASN1_ITEM_start(BIGNUM)
@@ -151,3 +154,13 @@ static int bn_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
}
return 1;
}
+
+static int bn_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it,
+ int indent, const ASN1_PCTX *pctx)
+{
+ if (!BN_print(out, *(BIGNUM **)pval))
+ return 0;
+ if (BIO_puts(out, "\n") <= 0)
+ return 0;
+ return 1;
+}