diff options
author | Rob Austein <sra@hactrn.net> | 2015-09-11 02:51:38 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-09-11 02:51:38 -0400 |
commit | 552892788514459055f665e2b021a780cbacd35b (patch) | |
tree | b18935c12b42ee21bfe358f7ae286ec3c548e137 | |
parent | e946b4661607736f1b89a7a107729382cb85fd55 (diff) |
Avoid gratuitous assertion failure if caller gives us a larger buffer
than necessary when writing private key to DER.
-rw-r--r-- | ecdsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1105,7 +1105,7 @@ hal_error_t hal_ecdsa_key_to_der(const hal_ecdsa_key_t * const key, fp_to_unsigned_bin(unconst_fp_int(key->Q->y), d + q_len - Qy_len); d += q_len; - assert(d == der + der_max); + assert(d <= der + der_max); return HAL_OK; } |