mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-04-08 03:44:31 +00:00
Added some changes to fix some issues causing a stackoverflow
This commit is contained in:
parent
f7103517d2
commit
577f3c7035
@ -353,21 +353,21 @@ public class EndorsementCredential extends DeviceAssociatedCertificate {
|
||||
obj = (ASN1TaggedObject) seq.getObjectAt(i);
|
||||
tag = obj.getTagNo();
|
||||
if (tag == EK_TYPE_TAG) {
|
||||
int ekGenTypeVal = ((ASN1Enumerated) obj.getBaseUniversal(true, tag)).getValue().intValue();
|
||||
int ekGenTypeVal = ((ASN1Enumerated) obj.getBaseObject()).getValue().intValue();
|
||||
if (ekGenTypeVal >= EK_TYPE_VAL_MIN && ekGenTypeVal <= EK_TYPE_VAL_MAX) {
|
||||
TPMSecurityAssertions.EkGenerationType ekGenType
|
||||
= TPMSecurityAssertions.EkGenerationType.values()[ekGenTypeVal];
|
||||
tpmSecurityAssertions.setEkGenType(ekGenType);
|
||||
}
|
||||
} else if (tag == EK_LOC_TAG) {
|
||||
int ekGenLocVal = ((ASN1Enumerated) obj.getBaseUniversal(true, tag)).getValue().intValue();
|
||||
int ekGenLocVal = ((ASN1Enumerated) obj.getBaseObject()).getValue().intValue();
|
||||
if (ekGenLocVal >= EK_LOC_VAL_MIN && ekGenLocVal <= EK_LOC_VAL_MAX) {
|
||||
TPMSecurityAssertions.EkGenerationLocation ekGenLocation
|
||||
= TPMSecurityAssertions.EkGenerationLocation.values()[ekGenLocVal];
|
||||
tpmSecurityAssertions.setEkGenerationLocation(ekGenLocation);
|
||||
}
|
||||
} else if (tag == EK_CERT_LOC_TAG) {
|
||||
int ekCertGenLocVal = ((ASN1Enumerated) obj.getBaseUniversal(true, tag))
|
||||
int ekCertGenLocVal = ((ASN1Enumerated) obj.getBaseObject())
|
||||
.getValue().intValue();
|
||||
if (ekCertGenLocVal >= EK_LOC_VAL_MIN
|
||||
&& ekCertGenLocVal <= EK_LOC_VAL_MAX) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user