aboutsummaryrefslogtreecommitdiff
path: root/asn1_internal.h
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2018-02-27 17:59:02 +0100
committerPaul Selkirk <paul@psgd.org>2018-04-19 18:57:32 -0400
commit67d4de2fdb0cb473e53da52b8639a27ce0dfc2b7 (patch)
tree490cf5ee6e13803e5c6efe35decd40eaf5737e44 /asn1_internal.h
parenta975cf2e6ad246ab499ba73259d97b889044731a (diff)
Encode/decode uint32_t and octet strings
Diffstat (limited to 'asn1_internal.h')
-rw-r--r--asn1_internal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/asn1_internal.h b/asn1_internal.h
index 3de8bd6..bba4503 100644
--- a/asn1_internal.h
+++ b/asn1_internal.h
@@ -117,9 +117,21 @@ extern hal_error_t hal_asn1_decode_header(const uint8_t tag,
extern hal_error_t hal_asn1_encode_integer(const fp_int * const bn,
uint8_t *der, size_t *der_len, const size_t der_max);
+extern hal_error_t hal_asn1_encode_uint32(const uint32_t n,
+ uint8_t *der, size_t *der_len, const size_t der_max);
+
+extern hal_error_t hal_asn1_encode_octet_string(const uint8_t * const data, const size_t data_len,
+ uint8_t *der, size_t *der_len, const size_t der_max);
+
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_decode_uint32(uint32_t *np,
+ const uint8_t * const der, size_t *der_len, const size_t der_max);
+
+extern hal_error_t hal_asn1_decode_octet_string(uint8_t *data, const size_t data_len,
+ 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,