From 48f301a63a9edf9e237824943e56c0bbed2a9a88 Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 24 Aug 2023 13:54:21 +0200 Subject: [PATCH] fixed certificates --- .../webservice/servicelayer/dao/impl/CertificateDAOImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/CertificateDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/CertificateDAOImpl.java index 18cc1579..41a53985 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/CertificateDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/CertificateDAOImpl.java @@ -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);