aboutsummaryrefslogtreecommitdiff
path: root/asn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'asn1.c')
-rw-r--r--asn1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/asn1.c b/asn1.c
index cfbd319..6727128 100644
--- a/asn1.c
+++ b/asn1.c
@@ -85,6 +85,8 @@ hal_error_t hal_asn1_encode_header(const uint8_t tag,
if (value_len + header_len > der_max)
return HAL_ERROR_RESULT_TOO_LONG;
+ *der++ = tag;
+
if (value_len < 128) {
*der = (uint8_t) value_len;
}