mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-06-21 00:23:11 +00:00
Modified the request class that handles uploading, deleting and other associated ACA actions, to only delete multiple associated certificates if the certificate being deleted is a base platform certificate. (#155)
This commit is contained in:
@ -261,16 +261,19 @@ public class CertificateRequestPageController extends PageController<NoPageParam
|
|||||||
} else {
|
} else {
|
||||||
if (certificateType.equals(PLATFORMCREDENTIAL)) {
|
if (certificateType.equals(PLATFORMCREDENTIAL)) {
|
||||||
PlatformCredential platformCertificate = (PlatformCredential) certificate;
|
PlatformCredential platformCertificate = (PlatformCredential) certificate;
|
||||||
List<PlatformCredential> sharedCertificates = getCertificateByBoardSN(
|
if (platformCertificate.isBase()) {
|
||||||
certificateType,
|
// only do this if the base is being deleted.
|
||||||
platformCertificate.getPlatformSerial(),
|
List<PlatformCredential> sharedCertificates = getCertificateByBoardSN(
|
||||||
certificateManager);
|
certificateType,
|
||||||
|
platformCertificate.getPlatformSerial(),
|
||||||
|
certificateManager);
|
||||||
|
|
||||||
if (sharedCertificates != null) {
|
if (sharedCertificates != null) {
|
||||||
for (PlatformCredential pc : sharedCertificates) {
|
for (PlatformCredential pc : sharedCertificates) {
|
||||||
if (!pc.isBase()) {
|
if (!pc.isBase()) {
|
||||||
pc.archive();
|
pc.archive();
|
||||||
certificateManager.update(pc);
|
certificateManager.update(pc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user