File tree 1 file changed +6
-1
lines changed
src/main/java/com/uid2/shared/secure/azurecc 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
package com .uid2 .shared .secure .azurecc ;
2
2
3
+ import com .uid2 .shared .secure .AttestationClientException ;
4
+ import com .uid2 .shared .secure .AttestationException ;
5
+ import com .uid2 .shared .secure .AttestationFailure ;
3
6
import lombok .Builder ;
4
7
import lombok .Value ;
5
8
@@ -26,11 +29,13 @@ public boolean isSevSnpVM(){
26
29
return SEV_SNP_VM_TYPE .equalsIgnoreCase (attestationType );
27
30
}
28
31
29
- public boolean isUtilityVMCompliant (){
32
+ public boolean isUtilityVMCompliant () throws AttestationClientException {
30
33
if (azureProtocol == AZURE_CC_ACI_PROTOCOL ) {
31
34
return AZURE_COMPLIANT_UVM .equalsIgnoreCase (complianceStatus );
32
35
} else if (azureProtocol == AZURE_CC_AKS_PROTOCOL ) {
33
36
return AZURE_COMPLIANT_UVM_AKS .equalsIgnoreCase (complianceStatus );
37
+ } else {
38
+ throw new AttestationClientException (String .format ("Azure protocol: %s not supported" , azureProtocol ), AttestationFailure .INVALID_PROTOCOL );
34
39
}
35
40
return false ;
36
41
}
You can’t perform that action at this time.
0 commit comments