Can't reproduce openssl command with BouncyCastle

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't reproduce openssl command with BouncyCastle

Augustin Julien
--------------------------------------------------------------
      From: Augustin Julien <[hidden email]>
        To: [hidden email]
   Subject: Can't reproduce openssl command with BouncyCastle

   I am trying, for already a couple of weeks to reproduce some openssl commands using bouncycastle and java.

After following a lot of samples and trying a lot of examples from Stackoverflow, I still can't make it work, thats why I'm asking for help now.

The openssl commands I have to reproduce are :

openssl smime -sign -in fileToSign.eml -out signedFile.step2 -passin pass:« password» -binary -nodetach -signer myprivatecert.pem -certfile mypubliccert.pem

This first commands takes 3 files, the file to sign, a private certificate and a public certificate.

For more informations, you can check out this link : https://stackoverflow.com/questions/54200397/cant-reproduce-openssl-command-with-bouncycastle

Does anyone knows how can I get the good results using bouncy castle ?
--------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Android can't find DataFlavor class, called by BouncyCastle

Augustin Julien
--------------------------------------------------------------
      From: Augustin Julien <[hidden email]>
        To: [hidden email]
   Subject: Android can't find DataFlavor class, called by BouncyCastle
Hello,

I'm having an issue with BouncyCastle for android.

The class DataFlavor located in java.awt.datatransfer was not found.

Here's the following stacktrace :
java.lang.NoClassDefFoundError: Failed resolution of: [Ljava/awt/datatransfer/DataFlavor;
                                                                                        at org.bouncycastle.mail.smime.handlers.pkcs7_mime.<clinit>(Unknown Source:14)
                                                                                        at java.lang.Class.newInstance(Native Method)
                                                                                        at javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:609)
                                                                                        at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:563)
                                                                                        at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:626)
                                                                                        at javax.activation.DataHandler.writeTo(DataHandler.java:329)
                                                                                        at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1692)
                                                                                        at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:996)

For information I've imported javamail for android (https://code.google.com/archive/p/javamail-android/)

I hope someone will be able to help me

Thanks in advance
--------------------------------------------------------------