diff options
author | Rob Austein <sra@hactrn.net> | 2017-09-12 10:19:27 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2017-09-12 10:19:27 -0400 |
commit | ae2985215d2329ac9663bbbedd925ec1b61cfaa1 (patch) | |
tree | 8c7900ddf70b4a18c17d857b9f5e99ed474b6b7e /rsa.c | |
parent | 8ff9d4131bf79b36551c2ed995881a88fb9c0a61 (diff) |
Silly macro bugs.
Diffstat (limited to 'rsa.c')
-rw-r--r-- | rsa.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; \ |