jgit/org.eclipse.jgit.gpg.bc
Thomas Wolf e3f7a06764 GPG: don't prompt for a passphrase for unprotected keys
BouncyCastle supports reading GPG keys without passphrase since 1.62.
Handle this in JGit, too, and don't prompt for a passphrase unless
it's necessary.

Make two passes over the private key files, a first pass without
passphrase provider. If that succeeds it has managed to read a
matching key without passphrase. Otherwise, ask the user for
the passphrase and make a second pass over the key files.

BouncyCastle 1.65 still has no method to get the GPG "key grip" from
a given public key, so JGit still cannot determine the correct file
to read up front. (The file name is the key grip as 40 hex digits,
upper case, with extension ".key").

Bug: 548763
Change-Id: I448181276548c08716d913c7ba1b4bc64c62f952
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2020-06-04 19:22:07 +02:00
..
.settings Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
META-INF Use version range to define fragment host bundle version 2020-06-04 14:15:08 +02:00
resources Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
src/org/eclipse/jgit/gpg/bc/internal GPG: don't prompt for a passphrase for unprotected keys 2020-06-04 19:22:07 +02:00
.classpath Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
.fbprefs Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
.gitignore Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
.project Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
BUILD Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
about.html Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
build.properties Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
plugin.properties Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
pom.xml Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00