diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/p5_pbe.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/p5_pbe.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/p5_pbe.c b/src/lib/libcrypto/asn1/p5_pbe.c index e0609e02e9..8fd416a3e5 100644 --- a/src/lib/libcrypto/asn1/p5_pbe.c +++ b/src/lib/libcrypto/asn1/p5_pbe.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p5_pbe.c,v 1.21 2016/12/30 16:04:34 jsing Exp $ */ | 1 | /* $OpenBSD: p5_pbe.c,v 1.22 2017/01/29 17:49:22 beck 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 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -127,19 +127,19 @@ PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, | |||
| 127 | 127 | ||
| 128 | pbe = PBEPARAM_new(); | 128 | pbe = PBEPARAM_new(); |
| 129 | if (!pbe) { | 129 | if (!pbe) { |
| 130 | ASN1err(ASN1_F_PKCS5_PBE_SET0_ALGOR, ERR_R_MALLOC_FAILURE); | 130 | ASN1error(ERR_R_MALLOC_FAILURE); |
| 131 | goto err; | 131 | goto err; |
| 132 | } | 132 | } |
| 133 | if (iter <= 0) | 133 | if (iter <= 0) |
| 134 | iter = PKCS5_DEFAULT_ITER; | 134 | iter = PKCS5_DEFAULT_ITER; |
| 135 | if (!ASN1_INTEGER_set(pbe->iter, iter)) { | 135 | if (!ASN1_INTEGER_set(pbe->iter, iter)) { |
| 136 | ASN1err(ASN1_F_PKCS5_PBE_SET0_ALGOR, ERR_R_MALLOC_FAILURE); | 136 | ASN1error(ERR_R_MALLOC_FAILURE); |
| 137 | goto err; | 137 | goto err; |
| 138 | } | 138 | } |
| 139 | if (!saltlen) | 139 | if (!saltlen) |
| 140 | saltlen = PKCS5_SALT_LEN; | 140 | saltlen = PKCS5_SALT_LEN; |
| 141 | if (!ASN1_STRING_set(pbe->salt, NULL, saltlen)) { | 141 | if (!ASN1_STRING_set(pbe->salt, NULL, saltlen)) { |
| 142 | ASN1err(ASN1_F_PKCS5_PBE_SET0_ALGOR, ERR_R_MALLOC_FAILURE); | 142 | ASN1error(ERR_R_MALLOC_FAILURE); |
| 143 | goto err; | 143 | goto err; |
| 144 | } | 144 | } |
| 145 | sstr = ASN1_STRING_data(pbe->salt); | 145 | sstr = ASN1_STRING_data(pbe->salt); |
| @@ -149,7 +149,7 @@ PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, | |||
| 149 | arc4random_buf(sstr, saltlen); | 149 | arc4random_buf(sstr, saltlen); |
| 150 | 150 | ||
| 151 | if (!ASN1_item_pack(pbe, &PBEPARAM_it, &pbe_str)) { | 151 | if (!ASN1_item_pack(pbe, &PBEPARAM_it, &pbe_str)) { |
| 152 | ASN1err(ASN1_F_PKCS5_PBE_SET0_ALGOR, ERR_R_MALLOC_FAILURE); | 152 | ASN1error(ERR_R_MALLOC_FAILURE); |
| 153 | goto err; | 153 | goto err; |
| 154 | } | 154 | } |
| 155 | 155 | ||
| @@ -174,7 +174,7 @@ PKCS5_pbe_set(int alg, int iter, const unsigned char *salt, int saltlen) | |||
| 174 | X509_ALGOR *ret; | 174 | X509_ALGOR *ret; |
| 175 | ret = X509_ALGOR_new(); | 175 | ret = X509_ALGOR_new(); |
| 176 | if (!ret) { | 176 | if (!ret) { |
| 177 | ASN1err(ASN1_F_PKCS5_PBE_SET, ERR_R_MALLOC_FAILURE); | 177 | ASN1error(ERR_R_MALLOC_FAILURE); |
| 178 | return NULL; | 178 | return NULL; |
| 179 | } | 179 | } |
| 180 | 180 | ||
