diff --git a/HIRS_Utils/src/main/java/hirs/data/persist/certificate/CertificateAuthorityCredential.java b/HIRS_Utils/src/main/java/hirs/data/persist/certificate/CertificateAuthorityCredential.java index ab428550..cbe13384 100644 --- a/HIRS_Utils/src/main/java/hirs/data/persist/certificate/CertificateAuthorityCredential.java +++ b/HIRS_Utils/src/main/java/hirs/data/persist/certificate/CertificateAuthorityCredential.java @@ -91,7 +91,7 @@ public class CertificateAuthorityCredential extends Certificate { byte[] tempBytes = getX509Certificate() .getExtensionValue(SUBJECT_KEY_IDENTIFIER_EXTENSION); - if (tempBytes.length > CA_BYTE_SIZE) { + if (tempBytes != null && tempBytes.length > CA_BYTE_SIZE) { this.subjectKeyIdentifier = truncatePrefixBytes(tempBytes); } else { this.subjectKeyIdentifier =