From: Jouni Malinen Date: Fri, 7 Feb 2020 23:28:46 +0000 (+0200) Subject: DPP: Fix encryptedContent DER encoding X-Git-Tag: hostap_2_10~1864 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c248ebaf4ff4ce01f18b754d178fbdb1a4009394;p=thirdparty%2Fhostap.git 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 --- 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);