Find if a certificate is self signed or CA signed

前端 未结 5 1722
情歌与酒
情歌与酒 2021-02-02 11:59

I have a web app, which allows user to upload pkcs12. I store the pkcs12 as binary in database. Is there any way for me to know if the certificate in the pkcs12 is self signed

5条回答
  •  别那么骄傲
    2021-02-02 12:32

    Have you tried the BouncyCastle lib?

    http://www.bouncycastle.org/wiki/display/JA1/Frequently+Asked+Questions

    " There are specific example programs for dealing with Attribute Certificates, PKCS12, SMIME and OpenPGP. They can be found in the packages:

    org.bouncycastle.jce.examples org.bouncycastle.mail.smime.examples org.bouncycastle.openpgp.examples Another useful source of examples is the test packages:

    org.bouncycastle.crypto.test org.bouncycastle.jce.provider.test org.bouncycastle.cms.test org.bouncycastle.mail.smime.test org.bouncycastle.openpgp.test org.bouncycastle.cert.test org.bouncycastle.pkcs.test org.bouncycastle.tsp.test "

提交回复
热议问题