Skip to content

Commit eb57122

Browse files
committed
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
2 parents ffca364 + 42c938d commit eb57122

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

tls/src/main/java/org/bouncycastle/jsse/provider/ProvAlgorithmConstraints.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,20 @@ public boolean permits(Set<BCCryptoPrimitive> primitives, String algorithm, Algo
8787

8888
if (null != provTlsDisabledAlgorithms && !provTlsDisabledAlgorithms.permits(primitives, algorithm, parameters))
8989
{
90+
if (LOG.isLoggable(Level.FINEST))
91+
{
92+
LOG.finest("'" + PROPERTY_TLS_DISABLED_ALGORITHMS + "' do not permit '" + algorithm + "' with given parameters");
93+
}
9094
return false;
9195
}
9296

9397
if (enableX509Constraints && null != provX509DisabledAlgorithms
9498
&& !provX509DisabledAlgorithms.permits(primitives, algorithm, parameters))
9599
{
100+
if (LOG.isLoggable(Level.FINEST))
101+
{
102+
LOG.finest("'" + PROPERTY_CERTPATH_DISABLED_ALGORITHMS + "' do not permit '" + algorithm + "' with given parameters");
103+
}
96104
return false;
97105
}
98106

@@ -146,17 +154,29 @@ public boolean permits(Set<BCCryptoPrimitive> primitives, String algorithm, Key
146154

147155
if (null != configAlgorithmConstraints && !configAlgorithmConstraints.permits(primitives, algorithm, key, parameters))
148156
{
157+
if (LOG.isLoggable(Level.FINEST))
158+
{
159+
LOG.finest("Configured algorithm constraints do not permit '" + algorithm + "' with given parameters and key");
160+
}
149161
return false;
150162
}
151163

152164
if (null != provTlsDisabledAlgorithms && !provTlsDisabledAlgorithms.permits(primitives, algorithm, key, parameters))
153165
{
166+
if (LOG.isLoggable(Level.FINEST))
167+
{
168+
LOG.finest("'" + PROPERTY_TLS_DISABLED_ALGORITHMS + "' do not permit '" + algorithm + "' with given parameters and key");
169+
}
154170
return false;
155171
}
156172

157173
if (enableX509Constraints && null != provX509DisabledAlgorithms
158174
&& !provX509DisabledAlgorithms.permits(primitives, algorithm, key, parameters))
159175
{
176+
if (LOG.isLoggable(Level.FINEST))
177+
{
178+
LOG.finest("'" + PROPERTY_CERTPATH_DISABLED_ALGORITHMS + "' do not permit '" + algorithm + "' with given parameters and key");
179+
}
160180
return false;
161181
}
162182

0 commit comments

Comments
 (0)