diff options
author | James M Snell <jasnell@gmail.com> | 2020-08-25 20:05:51 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-10-08 03:27:05 +0300 |
commit | dae283d96fd31ad0f30840a7e55ac97294f505ac (patch) | |
tree | 8f7f87e50411e8965cb83d9b280035f36d355fbc /src/node_errors.h | |
parent | ba77dc8597cbcf42feea59f1381512d421ec9cc5 (diff) |
crypto: refactoring internals, add WebCrypto
Fixes: https://github.com/nodejs/node/issues/678
Refs: https://github.com/nodejs/node/issues/26854
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/35093
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/node_errors.h')
-rw-r--r-- | src/node_errors.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/node_errors.h b/src/node_errors.h index 921fb09887f..873478c361f 100644 --- a/src/node_errors.h +++ b/src/node_errors.h @@ -33,9 +33,26 @@ void OnFatalError(const char* location, const char* message); V(ERR_BUFFER_TOO_LARGE, Error) \ V(ERR_CONSTRUCT_CALL_REQUIRED, TypeError) \ V(ERR_CONSTRUCT_CALL_INVALID, TypeError) \ + V(ERR_CRYPTO_INITIALIZATION_FAILED, Error) \ + V(ERR_CRYPTO_INVALID_AUTH_TAG, TypeError) \ + V(ERR_CRYPTO_INVALID_COUNTER, TypeError) \ + V(ERR_CRYPTO_INVALID_CURVE, TypeError) \ + V(ERR_CRYPTO_INVALID_DIGEST, TypeError) \ + V(ERR_CRYPTO_INVALID_IV, TypeError) \ + V(ERR_CRYPTO_INVALID_JWK, TypeError) \ + V(ERR_CRYPTO_INVALID_KEYLEN, RangeError) \ + V(ERR_CRYPTO_INVALID_KEYPAIR, RangeError) \ + V(ERR_CRYPTO_INVALID_KEYTYPE, RangeError) \ + V(ERR_CRYPTO_INVALID_MESSAGELEN, RangeError) \ + V(ERR_CRYPTO_INVALID_SCRYPT_PARAMS, RangeError) \ + V(ERR_CRYPTO_INVALID_STATE, Error) \ + V(ERR_CRYPTO_INVALID_TAG_LENGTH, RangeError) \ + V(ERR_CRYPTO_OPERATION_FAILED, Error) \ V(ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH, RangeError) \ V(ERR_CRYPTO_UNKNOWN_CIPHER, Error) \ V(ERR_CRYPTO_UNKNOWN_DH_GROUP, Error) \ + V(ERR_CRYPTO_UNSUPPORTED_OPERATION, Error) \ + V(ERR_CRYPTO_JOB_INIT_FAILED, Error) \ V(ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE, Error) \ V(ERR_INVALID_ARG_VALUE, TypeError) \ V(ERR_OSSL_EVP_INVALID_DIGEST, Error) \ @@ -89,10 +106,27 @@ void OnFatalError(const char* location, const char* message); "Buffer is not available for the current Context") \ V(ERR_CONSTRUCT_CALL_INVALID, "Constructor cannot be called") \ V(ERR_CONSTRUCT_CALL_REQUIRED, "Cannot call constructor without `new`") \ + V(ERR_CRYPTO_INITIALIZATION_FAILED, "Initialization failed") \ + V(ERR_CRYPTO_INVALID_AUTH_TAG, "Invalid authentication tag") \ + V(ERR_CRYPTO_INVALID_COUNTER, "Invalid counter") \ + V(ERR_CRYPTO_INVALID_CURVE, "Invalid EC curve name") \ + V(ERR_CRYPTO_INVALID_DIGEST, "Invalid digest") \ + V(ERR_CRYPTO_INVALID_IV, "Invalid initialization vector") \ + V(ERR_CRYPTO_INVALID_JWK, "Invalid JWK format") \ + V(ERR_CRYPTO_INVALID_KEYLEN, "Invalid key length") \ + V(ERR_CRYPTO_INVALID_KEYPAIR, "Invalid key pair") \ + V(ERR_CRYPTO_INVALID_KEYTYPE, "Invalid key type") \ + V(ERR_CRYPTO_INVALID_MESSAGELEN, "Invalid message length") \ + V(ERR_CRYPTO_INVALID_SCRYPT_PARAMS, "Invalid scrypt params") \ + V(ERR_CRYPTO_INVALID_STATE, "Invalid state") \ + V(ERR_CRYPTO_INVALID_TAG_LENGTH, "Invalid taglength") \ + V(ERR_CRYPTO_OPERATION_FAILED, "Operation failed") \ V(ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH, \ "Input buffers must have the same byte length") \ V(ERR_CRYPTO_UNKNOWN_CIPHER, "Unknown cipher") \ V(ERR_CRYPTO_UNKNOWN_DH_GROUP, "Unknown DH group") \ + V(ERR_CRYPTO_UNSUPPORTED_OPERATION, "Unsupported crypto operation") \ + V(ERR_CRYPTO_JOB_INIT_FAILED, "Failed to initialize crypto job config") \ V(ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE, \ "Context not associated with Node.js environment") \ V(ERR_INVALID_TRANSFER_OBJECT, "Found invalid object in transferList") \ |