summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_mpi.c
diff options
context:
space:
mode:
authorbeck <>2017-01-29 17:49:23 +0000
committerbeck <>2017-01-29 17:49:23 +0000
commit957b11334a7afb14537322f0e4795b2e368b3f59 (patch)
tree1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/bn/bn_mpi.c
parentdf96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff)
downloadopenbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.gz
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.bz2
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.zip
Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
Diffstat (limited to 'src/lib/libcrypto/bn/bn_mpi.c')
-rw-r--r--src/lib/libcrypto/bn/bn_mpi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_mpi.c b/src/lib/libcrypto/bn/bn_mpi.c
index cf4c7d8d24..4801192b50 100644
--- a/src/lib/libcrypto/bn/bn_mpi.c
+++ b/src/lib/libcrypto/bn/bn_mpi.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_mpi.c,v 1.7 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: bn_mpi.c,v 1.8 2017/01/29 17:49:22 beck Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -98,13 +98,13 @@ BN_mpi2bn(const unsigned char *d, int n, BIGNUM *a)
98 int neg = 0; 98 int neg = 0;
99 99
100 if (n < 4) { 100 if (n < 4) {
101 BNerr(BN_F_BN_MPI2BN, BN_R_INVALID_LENGTH); 101 BNerror(BN_R_INVALID_LENGTH);
102 return (NULL); 102 return (NULL);
103 } 103 }
104 len = ((long)d[0] << 24) | ((long)d[1] << 16) | ((int)d[2] << 8) | 104 len = ((long)d[0] << 24) | ((long)d[1] << 16) | ((int)d[2] << 8) |
105 (int)d[3]; 105 (int)d[3];
106 if ((len + 4) != n) { 106 if ((len + 4) != n) {
107 BNerr(BN_F_BN_MPI2BN, BN_R_ENCODING_ERROR); 107 BNerror(BN_R_ENCODING_ERROR);
108 return (NULL); 108 return (NULL);
109 } 109 }
110 110