Check out the Pastebin Gadgets Shop. We have thousands of fun, geeky & affordable gadgets on sale :-)Want more features on Pastebin? Sign Up, it's FREE!


By: a guest on Dec 4th, 2012  |  syntax: Bash  |  size: 0.83 KB  |  views: 88  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #convert key to pem format:
  2. openssl pkcs12 -in alonso-testkey.pfx -out key.pem -nocerts
  4. #rewrite without password
  5. openssl rsa -in key.pem -out key1.pem
  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:
  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
clone this paste RAW Paste Data