/* Checks Attestation report by calling the CMC to Verify and checking its status response
 */
Checks Attestation report by calling the CMC to Verify and checking its status response
/ * Checks Attestation report by calling the CMC to Verify and checking its status response * /
func obtainAR(req *ci.AttestationRequest) (resp *ci.AttestationResponse, err error) {
	cmcClient, cmcconn, cancel := getCMCServiceConn();
	if cmcClient == nil {
		return nil, errors.New("[Listener] Connection failed. No result obtained")
	}
	defer cmcconn.Close()
	defer cancel()
	req.Id = id
	resp, err = cmcClient.Attest(context.Background(), req)
	if err != nil {
		log.Error(err)
		return nil, errors.New("[Listener] Could not obtain attestation report")
	}
	return resp, nil
}
func obtainAR ( req * ci . AttestationRequest ) ( resp * ci . AttestationResponse , err error ) { cmcClient , cmcconn , cancel := getCMCServiceConn ( ) ; if cmcClient == nil { return nil , errors . New ( " " ) } defer cmcconn . Close ( ) defer cancel ( ) req . Id = id resp , err = cmcClient . Attest ( context . Background ( ) , req ) if err != nil { log . Error ( err ) return nil , errors . New ( " " ) } return resp , nil }
Checks Attestation report by calling the CMC to Verify and checking its status response
Checks Attestation report by calling the CMC to Verify and checking its status response
// Get backend connection // Extend Attest request with id // Call Attest request // Return response