mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-02-20 17:52:47 +00:00
Pulled back some additional changes because the initialization of
endorsement through issued was not happening due to the spotbug change for the lombok getter.
This commit is contained in:
parent
10343398d4
commit
4eafb655ba
@ -6,6 +6,7 @@ import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -17,6 +18,7 @@ import java.util.List;
|
||||
* Represents an issued attestation certificate to a HIRS Client.
|
||||
*/
|
||||
@NoArgsConstructor(access = AccessLevel.PROTECTED)
|
||||
@Getter
|
||||
@Entity
|
||||
public class IssuedAttestationCertificate extends DeviceAssociatedCertificate {
|
||||
|
||||
@ -45,11 +47,7 @@ public class IssuedAttestationCertificate extends DeviceAssociatedCertificate {
|
||||
final List<PlatformCredential> platformCredentials)
|
||||
throws IOException {
|
||||
super(certificateBytes);
|
||||
if (endorsementCredential != null) {
|
||||
this.endorsementCredential = new EndorsementCredential(endorsementCredential.getRawBytes());
|
||||
} else {
|
||||
this.endorsementCredential = null;
|
||||
}
|
||||
this.endorsementCredential = endorsementCredential;
|
||||
this.platformCredentials = new ArrayList<>(platformCredentials);
|
||||
}
|
||||
|
||||
@ -67,14 +65,6 @@ public class IssuedAttestationCertificate extends DeviceAssociatedCertificate {
|
||||
this(readBytes(certificatePath), endorsementCredential, platformCredentials);
|
||||
}
|
||||
|
||||
public EndorsementCredential getEndorsementCredential() {
|
||||
try {
|
||||
return new EndorsementCredential(endorsementCredential.getRawBytes());
|
||||
} catch (IOException ioEx) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public List<PlatformCredential> getPlatformCredentials() {
|
||||
return new ArrayList<>(platformCredentials);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user