aboutsummaryrefslogtreecommitdiff
path: root/src/iperf_auth.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/iperf_auth.h')
-rw-r--r--src/iperf_auth.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/iperf_auth.h b/src/iperf_auth.h
index 38971d8..0c6fb0f 100644
--- a/src/iperf_auth.h
+++ b/src/iperf_auth.h
@@ -27,10 +27,14 @@
#include <time.h>
#include <sys/types.h>
+#include <openssl/bio.h>
-int test_load_pubkey(const char *public_keyfile);
-int test_load_private_key(const char *private_keyfile);
-int encode_auth_setting(const char *username, const char *password, const char *public_keyfile, char **authtoken);
-int decode_auth_setting(int enable_debug, const char *authtoken, const char *private_keyfile, char **username, char **password, time_t *ts);
+int test_load_pubkey_from_file(const char *public_keyfile);
+int test_load_private_key_from_file(const char *private_keyfile);
+EVP_PKEY *load_pubkey_from_file(const char *file);
+EVP_PKEY *load_pubkey_from_base64(const char *buffer);
+EVP_PKEY *load_privkey_from_file(const char *file);
+int encode_auth_setting(const char *username, const char *password, EVP_PKEY *public_key, char **authtoken);
+int decode_auth_setting(int enable_debug, const char *authtoken, EVP_PKEY *private_key, char **username, char **password, time_t *ts);
int check_authentication(const char *username, const char *password, const time_t ts, const char *filename);
ssize_t iperf_getpass (char **lineptr, size_t *n, FILE *stream);