mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-28 00:38:56 +00:00
fixed hash size for EFI_CERT_SHA256_GUID, other minor changes
This commit is contained in:
parent
cbafa97d5d
commit
8d93e9eacb
@ -10,7 +10,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
import java.security.cert.CertificateException;
|
||||
|
||||
/**
|
||||
* Class for processing the contents of a Secure Boot DB or DBX contents.
|
||||
* Class for processing the contents of a Secure Boot PK, KEK, DB or DBX contents.
|
||||
* used for EFIVariables associated with Secure Boot
|
||||
* as defined by Section 32.4.1 Signature Database from the UEFI 2.8 specification
|
||||
* <p>
|
||||
@ -52,10 +52,14 @@ public class UefiSignatureData {
|
||||
*/
|
||||
@Getter
|
||||
private boolean valid = false;
|
||||
// /**
|
||||
// * UEFI Certificate SHA1 hash.
|
||||
// */
|
||||
// private byte[] binaryHash = new byte[UefiConstants.SIZE_40];
|
||||
/**
|
||||
* UEFI Certificate SHA1 hash.
|
||||
* UEFI Certificate SHA256 hash.
|
||||
*/
|
||||
private byte[] binaryHash = new byte[UefiConstants.SIZE_40];
|
||||
private byte[] binaryHash = new byte[UefiConstants.SIZE_32];
|
||||
/**
|
||||
* UEFI Signature data status.
|
||||
*/
|
||||
|
@ -214,11 +214,12 @@ public class UefiSignatureList {
|
||||
StringBuilder sigInfo = new StringBuilder();
|
||||
|
||||
if (!signatureTypeValid) {
|
||||
sigInfo.append(" *** Unknown UEFI Signature Type encountered: " + signatureType.toString() + "\n");
|
||||
sigInfo.append(" *** Unknown UEFI Signature Type encountered:\n" +
|
||||
" " + signatureType.toString() + "\n");
|
||||
}
|
||||
else {
|
||||
sigInfo.append(" UEFI Signature List Type = " + signatureType.toString() + "\n");
|
||||
sigInfo.append(" Number if items (certs, hashes, etc) = " + numberOfCerts + "\n");
|
||||
sigInfo.append(" Number of items (certs, hashes, etc) = " + numberOfCerts + "\n");
|
||||
|
||||
for (int i = 0; i < sigList.size(); i++) {
|
||||
UefiSignatureData certData = sigList.get(i);
|
||||
|
@ -163,8 +163,8 @@ public class UefiVariable {
|
||||
*/
|
||||
public String toString() {
|
||||
StringBuilder efiVariable = new StringBuilder();
|
||||
efiVariable.append("UEFI Variable Name:" + efiVarName + "\n");
|
||||
efiVariable.append("UEFI Variable GUID = " + uefiVarGuid.toString() + "\n");
|
||||
efiVariable.append("UEFI Variable Name: " + efiVarName + "\n");
|
||||
efiVariable.append("UEFI Variable GUID: " + uefiVarGuid.toString() + "\n");
|
||||
if (efiVarName != "") {
|
||||
efiVariable.append("UEFI Variable Contents => " + "\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user