aboutsummaryrefslogtreecommitdiff
path: root/src/noscrypt.c
diff options
context:
space:
mode:
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 */