diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-02-21 19:19:50 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-03-02 16:42:29 +0100 |
commit | 0e6fe9a5486ca02b5ef6d629645e434429663196 (patch) | |
tree | db2edd6c3b9b8c7d2d27550c9c759f0844300143 /contrib/embeddable-wg-library/test.c | |
parent | contrib: embedded-wg-library: add ability to add and del interfaces (diff) | |
download | wireguard-tools-0e6fe9a5486ca02b5ef6d629645e434429663196.tar.xz wireguard-tools-0e6fe9a5486ca02b5ef6d629645e434429663196.zip |
contrib: embedded-wg-library: add key generation functions
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'contrib/embeddable-wg-library/test.c')
-rw-r--r-- | contrib/embeddable-wg-library/test.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/embeddable-wg-library/test.c b/contrib/embeddable-wg-library/test.c index aad24de..8d4aae3 100644 --- a/contrib/embeddable-wg-library/test.c +++ b/contrib/embeddable-wg-library/test.c @@ -50,9 +50,11 @@ int main(int argc, char *argv[]) .first_peer = &new_peer, .last_peer = &new_peer }; + wg_key temp_private_key; - wg_key_from_base64(new_device.private_key, "SFLKy56SOiFoAvQDSCBRrH/nyYonuAQnyr/JTQRPDlU="); - wg_key_from_base64(new_peer.public_key, "aNoLvvCfgbtTf4f2Eb/CWVNvIc5AJt/4C4pKrxMUZlM="); + wg_generate_private_key(temp_private_key); + wg_generate_public_key(new_peer.public_key, temp_private_key); + wg_generate_private_key(new_device.private_key); if (wg_add_device(new_device.name) < 0) { perror("Unable to add device"); |