refactor(lib/attestation): cleanup struct token_sign_cntxt

Remove fields from struct token_sign_cntxt that are managed by
runtime/rsi/realm_attest.c

Change-Id: I7adf4d6a1aaf68224cd709c749f7cca7ccacc860
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/lib/attestation/src/attestation_token.c b/lib/attestation/src/attestation_token.c
index be12d39..1f51609 100644
--- a/lib/attestation/src/attestation_token.c
+++ b/lib/attestation/src/attestation_token.c
@@ -258,6 +258,8 @@
 			     unsigned int num_measurements,
 			     const void *rpv_buf,
 			     size_t rpv_len,
+			     const void *challenge_buf,
+			     size_t challenge_len,
 			     struct token_sign_cntxt *ctx,
 			     void *realm_token_buf,
 			     size_t realm_token_buf_size)
@@ -293,8 +295,8 @@
 	QCBOREncode_OpenMap(&(ctx->ctx.cbor_enc_ctx));
 
 	/* Add challenge value, which is the only input from the caller. */
-	buf.ptr = ctx->challenge;
-	buf.len = ATTEST_CHALLENGE_SIZE;
+	buf.ptr = challenge_buf;
+	buf.len = challenge_len;
 	QCBOREncode_AddBytesToMapN(&(ctx->ctx.cbor_enc_ctx),
 				   CCA_REALM_CHALLENGE,
 				   buf);