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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class CertificateNotTrustedException extends AuthTokenException {

public CertificateNotTrustedException(X509Certificate certificate, Throwable e) {
super("Certificate " + certificate.getSubjectDN() + " is not trusted", e);
super("Certificate " + certificate.getSubjectX500Principal() + " is not trusted", e);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public AuthTokenValidatorBuilder withTrustedCertificateAuthorities(X509Certifica
if (LOG.isDebugEnabled()) {
LOG.debug("Trusted intermediate certificate authorities set to {}",
configuration.getTrustedCACertificates().stream()
.map(X509Certificate::getSubjectDN)
.map(X509Certificate::getSubjectX500Principal)
.collect(Collectors.toList()));
}
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static void validateHasSigningExtension(X509Certificate certificate) thro
Objects.requireNonNull(certificate, "certificate");
try {
if (certificate.getExtendedKeyUsage() == null || !certificate.getExtendedKeyUsage().contains(OID_OCSP_SIGNING)) {
throw new OCSPCertificateException("Certificate " + certificate.getSubjectDN() +
throw new OCSPCertificateException("Certificate " + certificate.getSubjectX500Principal() +
" does not contain the key usage extension for OCSP response signing");
}
} catch (CertificateParsingException e) {
Expand Down
Loading