diff options
author | beck <> | 2017-01-29 17:49:23 +0000 |
---|---|---|
committer | beck <> | 2017-01-29 17:49:23 +0000 |
commit | 957b11334a7afb14537322f0e4795b2e368b3f59 (patch) | |
tree | 1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/rsa/rsa_none.c | |
parent | df96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff) | |
download | openbsd-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/rsa/rsa_none.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_none.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_none.c b/src/lib/libcrypto/rsa/rsa_none.c index 5222b3c1eb..13d3449a9f 100644 --- a/src/lib/libcrypto/rsa/rsa_none.c +++ b/src/lib/libcrypto/rsa/rsa_none.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_none.c,v 1.10 2014/10/18 17:20:40 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_none.c,v 1.11 2017/01/29 17:49:23 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 | * |
@@ -68,14 +68,12 @@ RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *from, | |||
68 | int flen) | 68 | int flen) |
69 | { | 69 | { |
70 | if (flen > tlen) { | 70 | if (flen > tlen) { |
71 | RSAerr(RSA_F_RSA_PADDING_ADD_NONE, | 71 | RSAerror(RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); |
72 | RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); | ||
73 | return 0; | 72 | return 0; |
74 | } | 73 | } |
75 | 74 | ||
76 | if (flen < tlen) { | 75 | if (flen < tlen) { |
77 | RSAerr(RSA_F_RSA_PADDING_ADD_NONE, | 76 | RSAerror(RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE); |
78 | RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE); | ||
79 | return 0; | 77 | return 0; |
80 | } | 78 | } |
81 | 79 | ||
@@ -88,7 +86,7 @@ RSA_padding_check_none(unsigned char *to, int tlen, const unsigned char *from, | |||
88 | int flen, int num) | 86 | int flen, int num) |
89 | { | 87 | { |
90 | if (flen > tlen) { | 88 | if (flen > tlen) { |
91 | RSAerr(RSA_F_RSA_PADDING_CHECK_NONE, RSA_R_DATA_TOO_LARGE); | 89 | RSAerror(RSA_R_DATA_TOO_LARGE); |
92 | return -1; | 90 | return -1; |
93 | } | 91 | } |
94 | 92 | ||