Skip to content

Commit

Permalink
fix a few type and format
Browse files Browse the repository at this point in the history
  • Loading branch information
yishi-ttd committed Nov 16, 2023
1 parent 513e219 commit 330f1f8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class AttestationException extends Exception {
private final boolean isClientError;

public boolean IsClientError(){
public boolean IsClientError() {
return this.isClientError;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public boolean isSuccess() {
public AttestationFailure getFailure() { return this.failure; }

public String getReason() {
if(this.attestationClientException != null){
if (this.attestationClientException != null) {
return this.attestationClientException.getMessage();
}
return this.failure.explain();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public void attest(byte[] attestationRequest, byte[] publicKey, Handler<AsyncRes
if (enclaveId != null) {
handler.handle(Future.succeededFuture(new AttestationResult(publicKey, enclaveId)));
} else {
LOGGER.warn("Can not find registered gcp-oidc enclave id.");
handler.handle(Future.succeededFuture(new AttestationResult(AttestationFailure.FORBIDDEN_ENCLAVE)));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private void verifyVM(MaaTokenPayload maaTokenPayload) throws AttestationExcepti
throw new AttestationClientException("Not run in Azure Compliance Utility VM");
}
if(maaTokenPayload.isVmDebuggable()){
throw new AttestationClientException("The underlying harware should not run in debug mode");
throw new AttestationClientException("The underlying hardware should not run in debug mode");
}
}

Expand Down

0 comments on commit 330f1f8

Please sign in to comment.