diff options
author | Rob Austein <sra@hactrn.net> | 2016-05-16 23:16:58 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-05-16 23:16:58 -0400 |
commit | c7a7c9a5913c56e4d555f8c1bb2b97a3068a8aae (patch) | |
tree | 1f24f2de896caa9ea1fb6c59f93c999edd4e8801 | |
parent | 87d20a89611e4a4367fc9ca87a817bb431c2a304 (diff) |
Fix inverted length check.
-rw-r--r-- | rpc_pkey.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -643,7 +643,7 @@ static hal_error_t pkey_local_sign_ecdsa(uint8_t *keybuf, const size_t keybuf_le (err = hal_rpc_hash_get_digest_length(alg, &input_len)) != HAL_OK) return err; - if (input_len < signature_max) + if (input_len > signature_max) return HAL_ERROR_RESULT_TOO_LONG; if ((err = hal_rpc_hash_finalize(hash, signature, input_len)) != HAL_OK) |