diff options
author | Rob Austein <sra@hactrn.net> | 2015-12-22 18:55:11 -0500 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-12-22 18:55:11 -0500 |
commit | 17da006ef0dcb18bf8da6ab6b90446c43a10c790 (patch) | |
tree | f6cef3ed996b6e452e18bfc2c1af350e3434185d /asn1_internal.h | |
parent | 36f9b6627d41f72af38be1d819f37c20a11f43c5 (diff) |
Add ASN.1 support for public keys (X.509 SubjectPublicKeyInfo format).
Diffstat (limited to 'asn1_internal.h')
-rw-r--r-- | asn1_internal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/asn1_internal.h b/asn1_internal.h index 18d4852..0b08b84 100644 --- a/asn1_internal.h +++ b/asn1_internal.h @@ -103,6 +103,16 @@ extern hal_error_t hal_asn1_encode_integer(const fp_int * const bn, extern hal_error_t hal_asn1_decode_integer(fp_int *bn, const uint8_t * const der, size_t *der_len, const size_t der_max); +extern hal_error_t hal_asn1_encode_spki(const uint8_t * const alg_oid, const size_t alg_oid_len, + const uint8_t * const curve_oid, const size_t curve_oid_len, + const uint8_t * const pubkey, const size_t pubkey_len, + uint8_t *der, size_t *der_len, const size_t der_max); + +extern hal_error_t hal_asn1_decode_spki(const uint8_t **alg_oid, size_t *alg_oid_len, + const uint8_t **curve_oid, size_t *curve_oid_len, + const uint8_t **pubkey, size_t *pubkey_len, + const uint8_t *const der, const size_t der_len); + #endif /* _HAL_ASN1_INTERNAL_H_ */ /* |