I have two certificates in base64 concatenated with bag attributes in a PEM file on Windows.
I'm trying to remove the bag attributes of the myChain-Bags.pem file from the CLI :
PS C:\temp> openssl version OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) PS C:\temp> openssl pkcs7 -in myChain-Bags.pem unable to load PKCS7 object BCA10000:error:068000A8:asn1 encoding routines:asn1_check_tlen:wrong tag:crypto\asn1\tasn_dec.c:1188: BCA10000:error:0688010A:asn1 encoding routines:asn1_d2i_ex_primitive:nested asn1 error:crypto\asn1\tasn_dec.c:752: BCA10000:error:0688010A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error:crypto\asn1\tasn_dec.c:685:Field=type, Type=PKCS7 BCA10000:error:0488000D:PEM routines:PEM_ASN1_read_bio:ASN1 lib:crypto\pem\pem_oth.c:33: PS C:\temp> How can I do that with the CLI ?