SEBSERV-135 fix
This commit is contained in:
parent
bcdd8b87bd
commit
e88f5146ab
1 changed files with 17 additions and 15 deletions
|
@ -216,6 +216,7 @@ public class CertificateDAOImpl implements CertificateDAO {
|
||||||
final boolean[] keyUsage = cert.getKeyUsage();
|
final boolean[] keyUsage = cert.getKeyUsage();
|
||||||
final EnumSet<CertificateType> result = EnumSet.noneOf(CertificateType.class);
|
final EnumSet<CertificateType> result = EnumSet.noneOf(CertificateType.class);
|
||||||
|
|
||||||
|
if (keyUsage != null) {
|
||||||
// digitalSignature
|
// digitalSignature
|
||||||
if (keyUsage[0]) {
|
if (keyUsage[0]) {
|
||||||
result.add(CertificateType.DIGITAL_SIGNATURE);
|
result.add(CertificateType.DIGITAL_SIGNATURE);
|
||||||
|
@ -230,9 +231,6 @@ public class CertificateDAOImpl implements CertificateDAO {
|
||||||
if (keyUsage[5]) {
|
if (keyUsage[5]) {
|
||||||
result.add(CertificateType.KEY_CERT_SIGN);
|
result.add(CertificateType.KEY_CERT_SIGN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.isEmpty()) {
|
|
||||||
result.add(CertificateType.UNKNOWN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final String alias = certificates.keyStore.engineGetCertificateAlias(cert);
|
final String alias = certificates.keyStore.engineGetCertificateAlias(cert);
|
||||||
|
@ -240,6 +238,10 @@ public class CertificateDAOImpl implements CertificateDAO {
|
||||||
result.add(CertificateType.DATA_ENCIPHERMENT_PRIVATE_KEY);
|
result.add(CertificateType.DATA_ENCIPHERMENT_PRIVATE_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result.isEmpty()) {
|
||||||
|
result.add(CertificateType.UNKNOWN);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue