aboutsummaryrefslogtreecommitdiff
path: root/rsa.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2017-09-12 10:19:27 -0400
committerRob Austein <sra@hactrn.net>2017-09-12 10:19:27 -0400
commitae2985215d2329ac9663bbbedd925ec1b61cfaa1 (patch)
tree8c7900ddf70b4a18c17d857b9f5e99ed474b6b7e /rsa.c
parent8ff9d4131bf79b36551c2ed995881a88fb9c0a61 (diff)
Silly macro bugs.
Diffstat (limited to 'rsa.c')
-rw-r--r--rsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rsa.c b/rsa.c
index e414e93..24dc66f 100644
--- a/rsa.c
+++ b/rsa.c
@@ -895,7 +895,7 @@ hal_error_t hal_rsa_private_key_to_der_extra_maybe(const hal_rsa_key_t * const k
#define _(x,y,z) \
if ((key->flags & z) != 0) { \
size_t n = 0; \
- if ((err = hal_asn1_encode_HEADER(x, sizeof(key->y), NULL, \
+ if ((err = hal_asn1_encode_header(x, sizeof(key->y), NULL, \
&n, 0)) != HAL_OK) \
return err; \
vlen += n + sizeof(key->y); \
@@ -1007,7 +1007,7 @@ hal_error_t hal_rsa_private_key_from_der(hal_rsa_key_t **key_,
#undef _
#define _(x,y,z) \
- if (hal_asn1_peek(d, vlen, x) { \
+ if (hal_asn1_peek(x, d, vlen)) { \
size_t hl = 0, vl = 0; \
if ((err = hal_asn1_decode_header(x, d, vlen, &hl, &vl)) != HAL_OK) \
return err; \