Skip to content

Commit a523c88

Browse files
committed
[dnssec] Add support for SHA-384 as DNSSEC DS RR digest algorithm
Fixes #139.
1 parent 86b0dcc commit a523c88

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

minidns-dnssec/src/main/java/org/minidns/dnssec/algorithms/AlgorithmMap.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ private AlgorithmMap() {
4848
throw new DnssecValidatorInitializationException("SHA-256 is mandatory", e);
4949
}
5050

51+
try {
52+
dsDigestMap.put(DigestAlgorithm.SHA384, new JavaSecDigestCalculator("SHA-384"));
53+
} catch (NoSuchAlgorithmException e) {
54+
// SHA-384 is OPTIONAL
55+
LOGGER.log(Level.FINE, "Platform does not support SHA-384", e);
56+
}
57+
5158
try {
5259
signatureMap.put(SignatureAlgorithm.RSAMD5, new RsaSignatureVerifier("MD5withRSA"));
5360
} catch (NoSuchAlgorithmException e) {

0 commit comments

Comments
 (0)