diff options
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_x931.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_x931.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_x931.c b/src/lib/libcrypto/rsa/rsa_x931.c index c3305139f8..74c4af91a5 100644 --- a/src/lib/libcrypto/rsa/rsa_x931.c +++ b/src/lib/libcrypto/rsa/rsa_x931.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_x931.c,v 1.4 2014/07/09 09:07:00 miod Exp $ */ | 1 | /* $OpenBSD: rsa_x931.c,v 1.5 2014/07/09 19:51:38 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2005. | 3 | * project 2005. |
4 | */ | 4 | */ |
@@ -10,7 +10,7 @@ | |||
10 | * are met: | 10 | * are met: |
11 | * | 11 | * |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * | 14 | * |
15 | * 2. Redistributions in binary form must reproduce the above copyright | 15 | * 2. Redistributions in binary form must reproduce the above copyright |
16 | * notice, this list of conditions and the following disclaimer in | 16 | * notice, this list of conditions and the following disclaimer in |
@@ -81,7 +81,7 @@ RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *from, | |||
81 | RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); | 81 | RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); |
82 | return -1; | 82 | return -1; |
83 | } | 83 | } |
84 | 84 | ||
85 | p = (unsigned char *)to; | 85 | p = (unsigned char *)to; |
86 | 86 | ||
87 | /* If no padding start and end nibbles are in one byte */ | 87 | /* If no padding start and end nibbles are in one byte */ |
@@ -103,7 +103,7 @@ RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *from, | |||
103 | 103 | ||
104 | int | 104 | int |
105 | RSA_padding_check_X931(unsigned char *to, int tlen, const unsigned char *from, | 105 | RSA_padding_check_X931(unsigned char *to, int tlen, const unsigned char *from, |
106 | int flen, int num) | 106 | int flen, int num) |
107 | { | 107 | { |
108 | int i = 0, j; | 108 | int i = 0, j; |
109 | const unsigned char *p = from; | 109 | const unsigned char *p = from; |
@@ -121,13 +121,14 @@ RSA_padding_check_X931(unsigned char *to, int tlen, const unsigned char *from, | |||
121 | break; | 121 | break; |
122 | if (c != 0xBB) { | 122 | if (c != 0xBB) { |
123 | RSAerr(RSA_F_RSA_PADDING_CHECK_X931, | 123 | RSAerr(RSA_F_RSA_PADDING_CHECK_X931, |
124 | RSA_R_INVALID_PADDING); | 124 | RSA_R_INVALID_PADDING); |
125 | return -1; | 125 | return -1; |
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||
129 | if (i == 0) { | 129 | if (i == 0) { |
130 | RSAerr(RSA_F_RSA_PADDING_CHECK_X931, RSA_R_INVALID_PADDING); | 130 | RSAerr(RSA_F_RSA_PADDING_CHECK_X931, |
131 | RSA_R_INVALID_PADDING); | ||
131 | return -1; | 132 | return -1; |
132 | } | 133 | } |
133 | 134 | ||