mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-20 05:28:22 +00:00
Trying another method
This commit is contained in:
parent
c84d67dfd7
commit
adaf637456
@ -103,11 +103,17 @@ public class FirmwareScvValidator extends SupplyChainCredentialValidator {
|
|||||||
CertificateAuthorityCredential signingCert = null;
|
CertificateAuthorityCredential signingCert = null;
|
||||||
for (CertificateAuthorityCredential cert : allCerts) {
|
for (CertificateAuthorityCredential cert : allCerts) {
|
||||||
signingCert = cert;
|
signingCert = cert;
|
||||||
KeyStore keyStore = ValidationService.getCaChain(signingCert,
|
KeyStore keyStore = null;
|
||||||
caCredentialRepository);
|
|
||||||
Set<CertificateAuthorityCredential> set = ValidationService.getCaChainRec(signingCert,
|
Set<CertificateAuthorityCredential> set = ValidationService.getCaChainRec(signingCert,
|
||||||
Collections.emptySet(),
|
Collections.emptySet(),
|
||||||
caCredentialRepository);
|
caCredentialRepository);
|
||||||
|
try {
|
||||||
|
keyStore = ValidationService.caCertSetToKeystore(set);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("Error building CA chain for " + signingCert.getSubjectKeyIdentifier() + ": "
|
||||||
|
+ e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList<X509Certificate> certs = new ArrayList<>(set.size());
|
ArrayList<X509Certificate> certs = new ArrayList<>(set.size());
|
||||||
for (CertificateAuthorityCredential cac : set) {
|
for (CertificateAuthorityCredential cac : set) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user