From c248ebaf4ff4ce01f18b754d178fbdb1a4009394 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 8 Feb 2020 01:28:46 +0200 Subject: [PATCH] DPP: Fix encryptedContent DER encoding This was not supposed to set the constructed bit in the header. Fix this to avoid parsing issues with other ASN.1 DER parsers. Fixes: c025c2eb5911 ("DPP: DPPEnvelopedData generation for Configurator backup") Signed-off-by: Jouni Malinen --- src/common/dpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/dpp.c b/src/common/dpp.c index 9cdd926ff..7152703e6 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -5570,7 +5570,7 @@ dpp_build_enc_cont_info(struct dpp_authentication *auth, size_t hash_len, /* encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL * EncryptedContent ::= OCTET STRING */ - asn1_put_hdr(enc_cont_info, ASN1_CLASS_CONTEXT_SPECIFIC, 1, 0, + asn1_put_hdr(enc_cont_info, ASN1_CLASS_CONTEXT_SPECIFIC, 0, 0, wpabuf_len(enc_cont)); wpabuf_put_buf(enc_cont_info, enc_cont);