Skip to content

Commit 28cf3dd

Browse files
chlily1Boringssl LUCI CQ
authored andcommitted
Fix misspelling in error reason name
And leaves a compatibility define for the old misspelled name. OpenSSL had the typo too, and they fixed it in openssl/openssl#14429. Change-Id: I992a36962a32648ef2843196f17f640c6a6a6964 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/91127 Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com> Auto-Submit: Lily Chen <chlily@google.com>
1 parent 4d96999 commit 28cf3dd

File tree

4 files changed

+490
-487
lines changed

4 files changed

+490
-487
lines changed

crypto/err/evp.errordata

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ EVP,121,NO_MDC2_SUPPORT
3333
EVP,122,NO_NID_FOR_CURVE
3434
EVP,123,NO_OPERATION_SET
3535
EVP,124,NO_PARAMETERS_SET
36+
EVP,126,OPERATION_NOT_INITIALIZED
3637
EVP,125,OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE
37-
EVP,126,OPERATON_NOT_INITIALIZED
3838
EVP,139,PRIVATE_KEY_WAS_NOT_SEED
3939
EVP,127,UNKNOWN_PUBLIC_KEY_TYPE
4040
EVP,128,UNSUPPORTED_ALGORITHM

crypto/evp/evp_ctx.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, uint8_t *sig, size_t *sig_len,
194194
return 0;
195195
}
196196
if (impl->operation != EVP_PKEY_OP_SIGN) {
197-
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATON_NOT_INITIALIZED);
197+
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATION_NOT_INITIALIZED);
198198
return 0;
199199
}
200200
return impl->pmeth->sign(impl, sig, sig_len, digest, digest_len);
@@ -220,7 +220,7 @@ int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, const uint8_t *sig, size_t sig_len,
220220
return 0;
221221
}
222222
if (impl->operation != EVP_PKEY_OP_VERIFY) {
223-
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATON_NOT_INITIALIZED);
223+
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATION_NOT_INITIALIZED);
224224
return 0;
225225
}
226226
return impl->pmeth->verify(impl, sig, sig_len, digest, digest_len);
@@ -244,7 +244,7 @@ int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *outlen,
244244
return 0;
245245
}
246246
if (impl->operation != EVP_PKEY_OP_ENCRYPT) {
247-
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATON_NOT_INITIALIZED);
247+
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATION_NOT_INITIALIZED);
248248
return 0;
249249
}
250250
return impl->pmeth->encrypt(impl, out, outlen, in, inlen);
@@ -268,7 +268,7 @@ int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *outlen,
268268
return 0;
269269
}
270270
if (impl->operation != EVP_PKEY_OP_DECRYPT) {
271-
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATON_NOT_INITIALIZED);
271+
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATION_NOT_INITIALIZED);
272272
return 0;
273273
}
274274
return impl->pmeth->decrypt(impl, out, outlen, in, inlen);
@@ -292,7 +292,7 @@ int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *out_len,
292292
return 0;
293293
}
294294
if (impl->operation != EVP_PKEY_OP_VERIFYRECOVER) {
295-
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATON_NOT_INITIALIZED);
295+
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATION_NOT_INITIALIZED);
296296
return 0;
297297
}
298298
return impl->pmeth->verify_recover(impl, out, out_len, sig, sig_len);
@@ -319,7 +319,7 @@ int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer) {
319319
if (impl->operation != EVP_PKEY_OP_DERIVE &&
320320
impl->operation != EVP_PKEY_OP_ENCRYPT &&
321321
impl->operation != EVP_PKEY_OP_DECRYPT) {
322-
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATON_NOT_INITIALIZED);
322+
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATION_NOT_INITIALIZED);
323323
return 0;
324324
}
325325

@@ -371,7 +371,7 @@ int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, uint8_t *key, size_t *out_key_len) {
371371
return 0;
372372
}
373373
if (impl->operation != EVP_PKEY_OP_DERIVE) {
374-
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATON_NOT_INITIALIZED);
374+
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATION_NOT_INITIALIZED);
375375
return 0;
376376
}
377377
return impl->pmeth->derive(impl, key, out_key_len);
@@ -405,7 +405,7 @@ int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **out_pkey) {
405405
return 0;
406406
}
407407
if (impl->operation != EVP_PKEY_OP_KEYGEN) {
408-
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATON_NOT_INITIALIZED);
408+
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATION_NOT_INITIALIZED);
409409
return 0;
410410
}
411411

@@ -446,7 +446,7 @@ int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **out_pkey) {
446446
return 0;
447447
}
448448
if (impl->operation != EVP_PKEY_OP_PARAMGEN) {
449-
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATON_NOT_INITIALIZED);
449+
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATION_NOT_INITIALIZED);
450450
return 0;
451451
}
452452

0 commit comments

Comments
 (0)