diff --git a/test/fko-wrapper/fko_wrapper.c b/test/fko-wrapper/fko_wrapper.c index f9ed2b1d..67aec34e 100644 --- a/test/fko-wrapper/fko_wrapper.c +++ b/test/fko-wrapper/fko_wrapper.c @@ -15,16 +15,15 @@ #define ENABLE_GPG_TESTS 0 #define FCN_CALLS 5 +static void display_ctx(fko_ctx_t ctx); + int main(void) { - fko_ctx_t ctx = NULL; + fko_ctx_t ctx = NULL, decrypt_ctx = NULL; int i; char *spa_data; - for (i=0; iencryption_mode, NULL, 0)); + + for (i=0; i" : rand_val); + printf(" Username: %s\n", username == NULL ? "" : username); + printf(" Timestamp: %u\n", (unsigned int) timestamp); + printf(" FKO Version: %s\n", version == NULL ? "" : version); + printf(" Message Type: %i\n", msg_type); + printf(" Message String: %s\n", spa_message == NULL ? "" : spa_message); + printf(" Nat Access: %s\n", nat_access == NULL ? "" : nat_access); + printf(" Server Auth: %s\n", server_auth == NULL ? "" : server_auth); + printf(" Client Timeout: %u\n", client_timeout); + printf(" Digest Type: %d\n", digest_type); + printf("Encryption Mode: %d\n", encryption_mode); + printf("\n Encoded Data: %s\n", enc_data == NULL ? "" : enc_data); + printf("SPA Data Digest: %s\n", spa_digest == NULL ? "" : spa_digest); + printf(" HMAC-SHA256: %s\n", hmac_data == NULL ? "" : hmac_data); + + if (enc_data != NULL && spa_digest != NULL) + printf(" Plaintext: %s:%s\n", enc_data, spa_digest); + + printf("\nFinal Packed/Encrypted/Encoded Data:\n\n%s\n\n", spa_data); +} +