fixed certificates

This commit is contained in:
anhefti 2023-08-24 13:54:21 +02:00
parent b9d3b4522a
commit 48f301a63a

View file

@ -240,7 +240,7 @@ public class CertificateDAOImpl implements CertificateDAO {
} catch (final Exception e) {
log.error("Error while trying to get alias from certificate subject name: {}", e.getMessage());
try {
final String name = certificate.getSubjectDN().getName();
final String name = certificate.getSubjectX500Principal().getName();
if (StringUtils.isNotBlank(name)) {
final String al = name.replace(" ", "").replace(",", "_").replace("=", "-");
log.info("Certificate import: DN name as alias: {}", al);