Giter VIP home page Giter VIP logo

Comments (7)

kaikramer avatar kaikramer commented on August 11, 2024

Which signature algorithm was that? RSASSA-PSS? The "stepped out of BC provider" part is only true for p12 files.

That feature would fit nicely in release 5.4 which will add verification of jar signatures. I'll consider it.

from keystore-explorer.

gstanchev avatar gstanchev commented on August 11, 2024

You read my mind :). It was indeed that one.

from keystore-explorer.

kaikramer avatar kaikramer commented on August 11, 2024

I've had this problem a couple of months ago at work. The verification code in Java (Certificate.verify()) assumes that the signature parameters are always empty which is not the case for PSS signatures.

from keystore-explorer.

gstanchev avatar gstanchev commented on August 11, 2024

Hmm you're making reopen the test project I happily closed couple of hours ago. I did step through both the java and BC code below that method. I didn't step in Java 's Signature instantiation which was throwing the algorithm not supported exception trusting it that it knew it didn't support it. BC did fail the signature and it looked an honest sig failure. Now I am going to see if I can use OpenSSL to peer-review that verification. So if I understand correctly what you're saying RSASSA-PSS is supported by JCE but the Certificate.verify() doesn't read it correctly? IIRC, it was using it's OID form as algorithm ID so I assumed it really doesn't know it. I already told the customer to go get another SSL cert from their CA because the signature is broken, I wonder if I was wrong...

from keystore-explorer.

kaikramer avatar kaikramer commented on August 11, 2024

JCA/JCE follows a plugin concept. If the BC provider is registered, then the OID for PSS is recognized by JCE and almost everything works. Except for code that is not generic enough to handle those new algorithms (like Certificate.verify()). But it is possible to verify PSS certificates in Java by using Signature.verify() (and manually reading out and setting the PSS parameters for verification).

That being said, I have never seen PSS certificates in the wild. And in my experience a lot of standard software (some relatively new Firefox versions for example) has problems with them.

from keystore-explorer.

gstanchev avatar gstanchev commented on August 11, 2024

Kai, thank you for the info on this. "openssl verify ..." passes just fine on the chain, as your info above has suggested. We do have BC registered at slot 2 in our server, but unfortunately for my customer the issue arises on SSL handshake when JSSE's handshaker verifies peer trust which uses the Java PKIX classes which in turn use the Certificate.verify() at one point. They will just get another SSL cert. Again, thanks for your help!

from keystore-explorer.

kaikramer avatar kaikramer commented on August 11, 2024

You're welcome!

from keystore-explorer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.