daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Aug 20th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.nio.file.{Files, Paths}
  2. import $ivy.`org.bouncycastle:bcprov-jdk16:1.45`
  3. import $ivy.`org.bouncycastle:bcmail-jdk16:1.46`
  4. import $ivy.`org.bouncycastle:bcprov-ext-jdk16:1.46`
  5. import $ivy.`org.bouncycastle:bctsp-jdk16:1.46`
  6.  
  7. import $ivy.`org.bouncycastle:bcmail-jdk15on:1.60`
  8.  
  9.  
  10. import java.nio.file.{Files, Paths}
  11. import $ivy.`org.bouncycastle:bcprov-jdk15on:1.60`
  12. import $ivy.`org.bouncycastle:bcprov-ext-jdk15on:1.60`
  13. import org.bouncycastle.asn1.icao.CscaMasterList
  14. import org.bouncycastle.asn1.ASN1Primitive
  15. import org.bouncycastle.asn1.cms.ContentInfo
  16. import org.bouncycastle.asn1.cms.SignedData
  17. import org.bouncycastle.asn1.ASN1OctetString
  18.  
  19. val input = Files.readAllBytes(Paths.get("/Users/bigbear/Downloads/cert/20180808_DEMasterList.ml"))
  20. val content = ContentInfo.getInstance(input)
  21. val signData = SignedData.getInstance(content.getContent)
  22. val csca = CscaMasterList.getInstance(ASN1OctetString.getInstance(signData.getEncapContentInfo.getContent).getOctets)
  23.  
  24. openssl pkcs7 -in EF_SOD.DER -inform DER -out EF_SOD.PEM -outform PEM
  25. openssl asn1parse -in EF_SOD.BIN -inform DER -i|grep -B1 pkcs7-signedData
  26. openssl asn1parse -in EF_SOD.BIN -inform DER -out EF_SOD.BIN2 -noout  -offset 4 -length 1746
  27. openssl smime -verify -in EF_SOD.PEM -inform pem -CAfile fr.PEM > EF_SOD.data
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top