Advertisement
Guest User

Untitled

a guest
Dec 4th, 2012
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.83 KB | None | 0 0
  1. #convert key to pem format:
  2. openssl pkcs12 -in alonso-testkey.pfx -out key.pem -nocerts
  3.  
  4. #rewrite without password
  5. openssl rsa -in key.pem -out key1.pem
  6.  
  7. #decrypt without leading 4 bytes:
  8. cms -decrypt -inform DER -in sandvout-without-4byte.txt -out decrypted.bin -recip AlonsoCert.pem -inkey key1.pem
  9. Error decrypting CMS structure
  10. 3073943752:error:2E078066:CMS routines:cms_EncryptedContent_init_bio:cipher parameter initialisation error:cms_enc.c:139:
  11.  
  12. #decrypt with leading 4 bytes:
  13.  openssl cms -decrypt -inform DER -in sandvout.txt -out decrypted.bin -recip AlonsoCert.pem -inkey key1.pem
  14. Error reading S/MIME message
  15. 3073661128:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1319:
  16. 3073661128:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=CMS_ContentInfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement