aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls')
-rw-r--r--src/tls/tlsv1_common.c9
-rw-r--r--src/tls/tlsv1_common.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/tls/tlsv1_common.c b/src/tls/tlsv1_common.c
index 67b56df..326ff70 100644
--- a/src/tls/tlsv1_common.c
+++ b/src/tls/tlsv1_common.c
@@ -15,6 +15,7 @@
#include "includes.h"
#include "common.h"
+#include "crypto/sha1.h"
#include "x509v3.h"
#include "tlsv1_common.h"
@@ -265,3 +266,11 @@ const char * tls_version_str(u16 ver)
return "?";
}
+
+
+int tls_prf(const u8 *secret, size_t secret_len, const char *label,
+ const u8 *seed, size_t seed_len, u8 *out, size_t outlen)
+{
+ return tls_prf_sha1_md5(secret, secret_len, label, seed, seed_len, out,
+ outlen);
+}
diff --git a/src/tls/tlsv1_common.h b/src/tls/tlsv1_common.h
index 0c4f7df..d13dacd 100644
--- a/src/tls/tlsv1_common.h
+++ b/src/tls/tlsv1_common.h
@@ -220,5 +220,7 @@ void tls_verify_hash_add(struct tls_verify_hash *verify, const u8 *buf,
void tls_verify_hash_free(struct tls_verify_hash *verify);
int tls_version_ok(u16 ver);
const char * tls_version_str(u16 ver);
+int tls_prf(const u8 *secret, size_t secret_len, const char *label,
+ const u8 *seed, size_t seed_len, u8 *out, size_t outlen);
#endif /* TLSV1_COMMON_H */