aboutsummaryrefslogtreecommitdiff
path: root/src/noscrypt.c
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-05-29 13:25:51 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-05-29 13:25:51 -0400
commit88c9095743a12cf8fc1793c607ba3a1e4fa86483 (patch)
tree4c96aa75f5ea28a29ab8ab96e8d351fb283c554d /src/noscrypt.c
parent718be80a4810b9352de7eb0707da54020aa6b649 (diff)
refactor!: return NC_SUCCESS when validating secret key
Diffstat (limited to 'src/noscrypt.c')
-rw-r--r--src/noscrypt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/noscrypt.c b/src/noscrypt.c
index 258ba8d..f1aabd4 100644
--- a/src/noscrypt.c
+++ b/src/noscrypt.c
@@ -542,7 +542,9 @@ NC_EXPORT NCResult NC_CC NCValidateSecretKey(const NCContext* ctx, const NCSecre
CHECK_CONTEXT_STATE(ctx, 0)
/* Validate the secret key */
- return secp256k1_ec_seckey_verify(ctx->secpCtx, sk->key);
+ return secp256k1_ec_seckey_verify(ctx->secpCtx, sk->key) == 1
+ ? NC_SUCCESS
+ : E_OPERATION_FAILED;
}
/* Ecdsa Functions */