Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions jgit-gpg-bc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ plugins {
id("org.openrewrite.build.language-library")
}

val bcVersion = "1.70"
val bcVersion = "1.85"
val bcProvVersion = "1.85.2"
dependencies {
implementation(project(":jgit"))
compileOnly("org.slf4j:slf4j-api:1.7.36")
implementation("org.bouncycastle:bcpg-jdk15on:$bcVersion")
implementation("org.bouncycastle:bcprov-jdk15on:$bcVersion")
implementation("org.bouncycastle:bcutil-jdk15on:$bcVersion")
implementation("org.bouncycastle:bcpkix-jdk15on:$bcVersion")
implementation("org.bouncycastle:bcpg-jdk18on:$bcVersion")
implementation("org.bouncycastle:bcprov-jdk18on:$bcProvVersion")
implementation("org.bouncycastle:bcutil-jdk18on:$bcVersion")
}

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static BCText get() {
// @formatter:off
/***/ public String corrupt25519Key;
/***/ public String credentialPassphrase;
/***/ public String cryptAeadUnsupported;
/***/ public String cryptCipherError;
/***/ public String cryptWrongDecryptedLength;
/***/ public String gpgFailedToParseSecretKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ public PBESecretKeyDecryptor createDecryptor(String protection)
throws PGPException {
return new PBESecretKeyDecryptor(passphrase, calculatorProvider) {

@Override
public byte[] recoverKeyData(int encAlgorithm, int aeadAlgorithm,
byte[] key, byte[] iv, int packetTag, int keyVersion,
byte[] keyData, byte[] pubkeyData) throws PGPException {
// The AAD is fixed at factory level, so this decryptor cannot
// serve the v6 key format, which derives it per key.
throw new PGPException(BCText.get().cryptAeadUnsupported);
}

@Override
public byte[] recoverKeyData(int encAlgorithm, byte[] key,
byte[] iv, byte[] encrypted, int encryptedOffset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

corrupt25519Key=Ed25519/Curve25519 public key has wrong length: {0}
credentialPassphrase=Passphrase
cryptAeadUnsupported=Cannot decrypt AEAD-protected secret keys in the OpenPGP v6 key format
cryptCipherError=Cannot create cipher to decrypt: {0}
cryptWrongDecryptedLength=Decrypted key has wrong length; expected {0} bytes, got only {1} bytes
gpgFailedToParseSecretKey=Failed to parse secret key file {0}. Is the entered passphrase correct?
Expand Down
1 change: 0 additions & 1 deletion jgit-ssh-jsch/README.md

This file was deleted.

28 changes: 0 additions & 28 deletions jgit-ssh-jsch/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading