diff --git a/rpm/src/main/java/org/eclipse/packager/rpm/HashAlgorithm.java b/rpm/src/main/java/org/eclipse/packager/rpm/HashAlgorithm.java index 37876f9..4daa1d6 100644 --- a/rpm/src/main/java/org/eclipse/packager/rpm/HashAlgorithm.java +++ b/rpm/src/main/java/org/eclipse/packager/rpm/HashAlgorithm.java @@ -42,7 +42,7 @@ public String getId() { *

* This method will return the hash algorithm as specified by the * parameter "name". If this parameter is {@code null} or an empty - * string, then the default algorithm {@link #SHA1} will be returned. If + * string, then the default algorithm {@link #SHA256} will be returned. If * algorithm is an invalid name, then an exception is thrown. *

* @@ -52,7 +52,7 @@ public String getId() { */ public static HashAlgorithm from(final String name) { if (name == null || name.isEmpty()) { - return SHA1; + return SHA256; } return HashAlgorithm.valueOf(name); diff --git a/rpm/src/main/java/org/eclipse/packager/rpm/signature/RsaHeaderSignatureProcessor.java b/rpm/src/main/java/org/eclipse/packager/rpm/signature/RsaHeaderSignatureProcessor.java index 7bd2b26..473cca8 100644 --- a/rpm/src/main/java/org/eclipse/packager/rpm/signature/RsaHeaderSignatureProcessor.java +++ b/rpm/src/main/java/org/eclipse/packager/rpm/signature/RsaHeaderSignatureProcessor.java @@ -50,7 +50,7 @@ public RsaHeaderSignatureProcessor(final PGPPrivateKey privateKey, final HashAlg } public RsaHeaderSignatureProcessor(final PGPPrivateKey privateKey) { - this(privateKey, HashAlgorithmTags.SHA1); + this(privateKey, HashAlgorithmTags.SHA256); } @Override diff --git a/rpm/src/main/java/org/eclipse/packager/rpm/signature/RsaSignatureProcessor.java b/rpm/src/main/java/org/eclipse/packager/rpm/signature/RsaSignatureProcessor.java index 91f4335..123c993 100644 --- a/rpm/src/main/java/org/eclipse/packager/rpm/signature/RsaSignatureProcessor.java +++ b/rpm/src/main/java/org/eclipse/packager/rpm/signature/RsaSignatureProcessor.java @@ -53,7 +53,7 @@ public RsaSignatureProcessor(final PGPPrivateKey privateKey, final HashAlgorithm } public RsaSignatureProcessor(final PGPPrivateKey privateKey) { - this(privateKey, HashAlgorithmTags.SHA1); + this(privateKey, HashAlgorithmTags.SHA256); } @Override diff --git a/rpm/src/main/java/org/eclipse/packager/rpm/yum/RepositoryCreator.java b/rpm/src/main/java/org/eclipse/packager/rpm/yum/RepositoryCreator.java index 6bb9600..6f9a8d2 100644 --- a/rpm/src/main/java/org/eclipse/packager/rpm/yum/RepositoryCreator.java +++ b/rpm/src/main/java/org/eclipse/packager/rpm/yum/RepositoryCreator.java @@ -440,7 +440,7 @@ public Builder setSigning(final Function signingStre } public Builder setSigning(final PGPPrivateKey privateKey) { - return setSigning(privateKey, HashAlgorithmTags.SHA1); + return setSigning(privateKey, HashAlgorithmTags.SHA256); } public Builder setSigning(final PGPPrivateKey privateKey, final HashAlgorithm hashAlgorithm) {