Open Susmit07 opened 4 years ago
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):
Please test with 2.3.0 (should be in maven any time now)
I am able to solve this in a different way, do you want me to commit ?
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):