aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-09-11 02:51:38 -0400
committerRob Austein <sra@hactrn.net>2015-09-11 02:51:38 -0400
commit552892788514459055f665e2b021a780cbacd35b (patch)
treeb18935c12b42ee21bfe358f7ae286ec3c548e137
parente946b4661607736f1b89a7a107729382cb85fd55 (diff)
Avoid gratuitous assertion failure if caller gives us a larger buffer
than necessary when writing private key to DER.
-rw-r--r--ecdsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ecdsa.c b/ecdsa.c
index 8799ece..264f2c5 100644
--- a/ecdsa.c
+++ b/ecdsa.c
@@ -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;
}