]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Fix encryptedContent DER encoding
authorJouni Malinen <jouni@codeaurora.org>
Fri, 7 Feb 2020 23:28:46 +0000 (01:28 +0200)
committerJouni Malinen <jouni@codeaurora.org>
Sat, 8 Feb 2020 05:19:53 +0000 (07:19 +0200)
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 <jouni@codeaurora.org>
src/common/dpp.c

index 9cdd926fff7805a6727d6fb0c989c25d85398881..7152703e69e5e445504a3d1f5f3f9dfd9efef8cf 100644 (file)
@@ -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);