mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-07 15:09:42 +00:00
Fix reason code: EVP_R_OPERATON_NOT_INITIALIZED
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14429)
This commit is contained in:
parent
903a655847
commit
bf23b9a163
crypto
include/openssl
@ -708,7 +708,7 @@ EVP_R_NULL_MAC_PKEY_CTX:208:null mac pkey ctx
|
||||
EVP_R_ONLY_ONESHOT_SUPPORTED:177:only oneshot supported
|
||||
EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE:150:\
|
||||
operation not supported for this keytype
|
||||
EVP_R_OPERATON_NOT_INITIALIZED:151:operation not initialized
|
||||
EVP_R_OPERATION_NOT_INITIALIZED:151:operation not initialized
|
||||
EVP_R_OUTPUT_WOULD_OVERFLOW:202:output would overflow
|
||||
EVP_R_PARAMETER_TOO_LARGE:187:parameter too large
|
||||
EVP_R_PARTIALLY_OVERLAPPING:162:partially overlapping buffers
|
||||
|
@ -183,7 +183,7 @@ int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
|
||||
}
|
||||
|
||||
if (ctx->operation != EVP_PKEY_OP_ENCRYPT) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
|
||||
}
|
||||
|
||||
if (ctx->operation != EVP_PKEY_OP_DECRYPT) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ static const ERR_STRING_DATA EVP_str_reasons[] = {
|
||||
"only oneshot supported"},
|
||||
{ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE),
|
||||
"operation not supported for this keytype"},
|
||||
{ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OPERATON_NOT_INITIALIZED),
|
||||
{ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OPERATION_NOT_INITIALIZED),
|
||||
"operation not initialized"},
|
||||
{ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OUTPUT_WOULD_OVERFLOW),
|
||||
"output would overflow"},
|
||||
|
@ -359,7 +359,7 @@ int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer)
|
||||
if (ctx->operation != EVP_PKEY_OP_DERIVE
|
||||
&& ctx->operation != EVP_PKEY_OP_ENCRYPT
|
||||
&& ctx->operation != EVP_PKEY_OP_DECRYPT) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -419,7 +419,7 @@ int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *pkeylen)
|
||||
}
|
||||
|
||||
if (!EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ int EVP_PKEY_encapsulate(EVP_PKEY_CTX *ctx,
|
||||
return 0;
|
||||
|
||||
if (ctx->operation != EVP_PKEY_OP_ENCAPSULATE) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ int EVP_PKEY_decapsulate(EVP_PKEY_CTX *ctx,
|
||||
return 0;
|
||||
|
||||
if (ctx->operation != EVP_PKEY_OP_DECAPSULATE) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ int EVP_PKEY_gen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey)
|
||||
ret = -2;
|
||||
goto end;
|
||||
not_initialized:
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
ret = -1;
|
||||
goto end;
|
||||
#ifndef FIPS_MODULE
|
||||
@ -258,7 +258,7 @@ int EVP_PKEY_gen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey)
|
||||
int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey)
|
||||
{
|
||||
if (ctx->operation != EVP_PKEY_OP_PARAMGEN) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
return EVP_PKEY_gen(ctx, ppkey);
|
||||
@ -267,7 +267,7 @@ int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey)
|
||||
int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey)
|
||||
{
|
||||
if (ctx->operation != EVP_PKEY_OP_KEYGEN) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
return EVP_PKEY_gen(ctx, ppkey);
|
||||
|
@ -555,7 +555,7 @@ int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
|
||||
}
|
||||
|
||||
if (ctx->operation != EVP_PKEY_OP_SIGN) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -594,7 +594,7 @@ int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
|
||||
}
|
||||
|
||||
if (ctx->operation != EVP_PKEY_OP_VERIFY) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -631,7 +631,7 @@ int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
|
||||
}
|
||||
|
||||
if (ctx->operation != EVP_PKEY_OP_VERIFYRECOVER) {
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATON_NOT_INITIALIZED);
|
||||
ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1454,6 +1454,11 @@ OSSL_DEPRECATEDIN_3_0 int ERR_load_X509V3_strings(void);
|
||||
# define X509V3_F_X509_PURPOSE_ADD 0
|
||||
# define X509V3_F_X509_PURPOSE_SET 0
|
||||
|
||||
/*
|
||||
* Compatibility defines.
|
||||
*/
|
||||
# define EVP_R_OPERATON_NOT_INITIALIZED EVP_R_OPERATION_NOT_INITIALIZED
|
||||
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
|
@ -96,7 +96,7 @@
|
||||
# define EVP_R_NULL_MAC_PKEY_CTX 208
|
||||
# define EVP_R_ONLY_ONESHOT_SUPPORTED 177
|
||||
# define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 150
|
||||
# define EVP_R_OPERATON_NOT_INITIALIZED 151
|
||||
# define EVP_R_OPERATION_NOT_INITIALIZED 151
|
||||
# define EVP_R_OUTPUT_WOULD_OVERFLOW 202
|
||||
# define EVP_R_PARAMETER_TOO_LARGE 187
|
||||
# define EVP_R_PARTIALLY_OVERLAPPING 162
|
||||
|
Loading…
x
Reference in New Issue
Block a user