in sdk/host/src/main/java/org/apache/teaclave/javasdk/host/EmbeddedLibOSEnclave.java [221:241]
AttestationReport generateAttestationReportNative(byte[] userData) throws RemoteAttestationException {
try {
SocketEnclaveInvocationContext context =
new SocketEnclaveInvocationContext(SocketEnclaveInvocationContext.REMOTE_ATTESTATION_GENERATE, userData);
EnclaveInvocationResult resultWrapper = (EnclaveInvocationResult) SerializationHelper.deserialize(
remoteRequest(SerializationHelper.serialize(context),
EmbeddedLibOSEnclaveConfigure.getInstance().getAgentHttpConnectTimeout(),
EmbeddedLibOSEnclaveConfigure.getInstance().getAgentHttpRATimeout()));
if (resultWrapper.getException() != null) {
throw resultWrapper.getException();
}
EmbeddedLibOSInnerAttestationReport report = (EmbeddedLibOSInnerAttestationReport) resultWrapper.getResult();
return new EmbeddedLibOSAttestationReport(
report.getQuote(),
report.getMrSigner(),
report.getMrEnclave(),
report.getUserData());
} catch (Throwable e) {
throw new RemoteAttestationException(e);
}
}