From a1ebd2f9623b6093b4778b899f5725554df59a68 Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Wed, 23 Feb 2022 10:13:20 -0500 Subject: [PATCH] Fixed null pointer found in git actions` --- .../persist/certificate/CertificateAuthorityCredential.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 =