RFC 3156 "application/pgp-signature" planned?

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

RFC 3156 "application/pgp-signature" planned?

Ralf Hauser
Hi,

Are there any plans to support http://www.ietf.org/rfc/rfc3156.txt in ?

Since thunderbird enigmail produces this since a while, it would be great to
have a org.bouncycastle.openpgp.PGPSigned in analogy to
org.bouncycastle.mail.smime.SMIMESigned? Any hints?

Regards Ralf

--
Securely and spam-free via:
https://www.privasphere.com/e.do?email=hauser(at)acm.org

Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++

Reply | Threaded
Open this post in threaded view
|

improve error message on "JCE cannot authenticate the provider BC"

Ralf Hauser
Hi,

The topic apparently comes up regularly.

Same here.

But only once I amended the code in PEMReader.readKeyPair to print the
stacktrace of the real, underlying exception, it became clear what the true
reason was:

- IOException: problem creating RSA private key:
java.lang.SecurityException: JCE cannot authenticate the provider BC

        at javax.crypto.SunJCE_d.a(DashoA12275)
        at javax.crypto.SunJCE_b.b(DashoA12275)
        at javax.crypto.SunJCE_b.a(DashoA12275)
        ... 35 more
Caused by: java.security.PrivilegedActionException:
java.util.zip.ZipException: Access is denied
        at java.security.AccessController.doPrivileged(Native Method)
        ... 40 more
Caused by: java.util.zip.ZipException: Access is denied
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:204)
        at java.util.jar.JarFile.<init>(JarFile.java:132)
        at java.util.jar.JarFile.<init>(JarFile.java:70)
        at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:56)
        at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:41)
        at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:63)
        at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85)
        at
sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69)
        at javax.crypto.SunJCE_e.run(DashoA12275)
        ... 41 more
java.lang.SecurityException: JCE cannot authenticate the provider BC
        at javax.crypto.Cipher.getInstance(DashoA12275)
        at javax.crypto.Cipher.getInstance(DashoA12275)
        at org.bouncycastle.openssl.PEMReader.readKeyPair(PEMReader.java:501)
...

So, the issue was that I ran my code in eclipse debug mode and did not put
on the classpath the bcprov*. jar but the class folder...

see also:
http://forum.java.sun.com/thread.jspa?threadID=633081&messageID=3666146 

--

Securely and spam-free via:
https://www.privasphere.com/e.do?email=hauser(at)acm.org

Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++