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

[MGPG-114] Allow max key size of 16KB #83

Merged
merged 1 commit into from Mar 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/org/apache/maven/plugins/gpg/BcSigner.java
Expand Up @@ -123,7 +123,7 @@ public final class GpgConfLoader implements Loader {
/**
* Maximum key size, see <a href="https://wiki.gnupg.org/LargeKeys">Large Keys</a>.
*/
private static final long MAX_SIZE = 5 * 1024 + 1L;
private static final long MAX_SIZE = 16 * 1024 + 1L;

@Override
public byte[] loadKeyRingMaterial(RepositorySystemSession session) throws IOException {
Expand All @@ -137,7 +137,7 @@ public byte[] loadKeyRingMaterial(RepositorySystemSession session) throws IOExce
if (Files.size(keyPath) < MAX_SIZE) {
return Files.readAllBytes(keyPath);
} else {
throw new IOException("Refusing to load key " + keyPath + "; is larger than 5KB");
throw new IOException("Refusing to load key " + keyPath + "; is larger than 16KB");
}
}
return null;
Expand Down