Sohan Badaya
Sohan Badaya

Reputation: 365

How to get signature list from PGPPublicKey using Bouncy Castle library?

I have a PGPPublicKey object. I want to get a list of all signatures(with UserId, email Id, trust level for each singature) associated with it using Bouncy Castle API. I tried but couldn't get it. If anyone has an example link or knows which method to use to get it, please let me know.

Upvotes: 3

Views: 1127

Answers (1)

JSuar
JSuar

Reputation: 21091

I've never used these classes but I thought it might be helpful to post some resources.

It looks like the Bouncy Castle OpenPGP releases include some examples.

I recommend using these examples to solve your problem. Specifically, it looks like you will need to use PGPSignatureList and PGPSignature classes which are utilized in the examples. However, I don't see emailId in any of the classes.

Also, http://www.bouncycastle.org/documentation.html suggests the following.

Finally there are also code examples from Beginning Cryptography with Java which demonstrate both the use of the JCE/JCA and also some of the Bouncy Castle APIs such as for certificate generation, CMS and S/MIME. Note: the book was written to cover J2SE 5.0, while many of the examples will work with earlier JDKs, some will not compile if you are not using J2SE 5.0 or later.

Upvotes: 3

Related Questions