Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions test/openssl/test_pkcs7.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ def test_degenerate_pkcs7
end

def test_split_content
pend "AWS-LC ASN.1 parsers has no current support for parsing indefinite BER constructed strings" if aws_lc?

pki_message_pem = <<END
-----BEGIN PKCS7-----
MIIHSwYJKoZIhvcNAQcCoIIHPDCCBzgCAQExCzAJBgUrDgMCGgUAMIIDiAYJKoZI
Expand Down Expand Up @@ -376,14 +378,9 @@ def test_split_content
END
pki_msg = OpenSSL::PKCS7.new(pki_message_pem)
store = OpenSSL::X509::Store.new
pki_msg.verify(nil, store, nil, OpenSSL::PKCS7::NOVERIFY)
assert_equal(true, pki_msg.verify(nil, store, nil, OpenSSL::PKCS7::NOVERIFY))
p7enc = OpenSSL::PKCS7.new(pki_msg.data)
# AWS-LC uses explicit OCTET STRING headers when encoding PKCS7 EncryptedContent,
# while OpenSSL traditionally uses indefinite-length encoding (ASN1_TFLG_NDEF)
# in its PKCS7 implementation.
unless aws_lc?
assert_equal(pki_message_content_pem, p7enc.to_pem)
end
assert_equal(pki_message_content_pem, p7enc.to_pem)
end
end

Expand Down
Loading