Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Key Usage for older legacy keys of PGP version 6.5.8 Network Associates #57

Open
Susmit07 opened this issue Sep 1, 2020 · 2 comments

Comments

@Susmit07
Copy link

Susmit07 commented Sep 1, 2020

No able to get the key usage from the Key rings of PGP version 6.5.8 Network Associates

Iterator<PGPSignature> sigItr = secretKey.getPublicKey().getSignatures(); StringBuilder keyUsage = new StringBuilder(); while (sigItr.hasNext()) { PGPSignature sig = sigItr.next(); PGPSignatureSubpacketVector subPacks = sig.getHashedSubPackets(); if (subPacks != null) { if ((subPacks.getKeyFlags() & KeyFlags.ENCRYPT_COMMS) == 4) {

Expected behavior

It should fetch me the actual key usages, it's working for all keys except for PGP version 6.5.8 Network associates types key

** System (please complete the following information):**

  • OS: [Windows, Linux]
  • Java [1.8]
@neuhalje
Copy link
Owner

Please test with 2.3.0 (should be in maven any time now)

@Susmit07
Copy link
Author

I am able to solve this in a different way, do you want me to commit ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants