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

searching for the public key is now case insensitive. #6

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ public static PGPPublicKeyRing extractPublicKeyRingForUserId(final String public
throw new IllegalArgumentException("publicKeyRings must not be null");
}

// the true parameter indicates, that partial matching of the publicKeyUid is enough.
final Iterator<?> keyRings = publicKeyRings.getKeyRings("<" + publicKeyUid + ">", true);
// the first true parameter indicates, that partial matching of the publicKeyUid is enough.
// the second true parameter indicates, that matching the publicKeyUid is case insensitive.
final Iterator<?> keyRings = publicKeyRings.getKeyRings("<" + publicKeyUid + ">", true, true);
PGPPublicKeyRing returnKeyRing = null;
while (keyRings.hasNext()) {
final Object currentKeyRing = keyRings.next();
Expand Down Expand Up @@ -180,7 +181,7 @@ public static PGPSecretKey extractSecretSigningKeyFromKeyrings(
PGPSecretKey key = null;

final Iterator<PGPSecretKeyRing> ringIterator = pgpSec
.getKeyRings("<" + signingKeyUid + ">", true);
.getKeyRings("<" + signingKeyUid + ">", true, true);
while (ringIterator.hasNext()) {
final PGPSecretKeyRing kRing = ringIterator.next();
final Iterator<PGPSecretKey> secretKeyIterator = kRing.getSecretKeys();
Expand Down