You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
607 B
24 lines
607 B
#include "../src/secure_channel.h" |
|
#include <stdio.h> |
|
|
|
int main() { |
|
printf("Testing sc_init_ctx...\n"); |
|
|
|
struct SC_MYKEYS keys; |
|
for (int i = 0; i < SC_PRIVKEY_SIZE; i++) { |
|
keys.private_key[i] = i; |
|
keys.public_key[i] = i + 64; |
|
} |
|
|
|
sc_context_t ctx; |
|
int result = sc_init_ctx(&ctx, &keys); |
|
printf("sc_init_ctx returned: %d\n", result); |
|
|
|
if (result == SC_OK) { |
|
printf("Context initialized successfully\n"); |
|
printf("initialized: %d\n", ctx.initialized); |
|
printf("peer_key_set: %d\n", ctx.peer_key_set); |
|
} |
|
|
|
return 0; |
|
}
|
|
|