From 849179ba2739ab9a0ad079384b125d9c1745db5f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 26 Jun 2012 14:52:46 +0200 Subject: SSL cleanup: use crypto functions through the sslgen layer curl_ntlm_msgs.c would previously use an #ifdef maze and direct SSL-library calls instead of using the SSL layer we have for this purpose. --- lib/sslgen.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/sslgen.h') diff --git a/lib/sslgen.h b/lib/sslgen.h index 1984a0d53..2369b552c 100644 --- a/lib/sslgen.h +++ b/lib/sslgen.h @@ -23,6 +23,10 @@ ***************************************************************************/ #include "setup.h" +#ifndef MD5_DIGEST_LENGTH +#define MD5_DIGEST_LENGTH 16 /* fixed size */ +#endif + bool Curl_ssl_config_matches(struct ssl_config_data* data, struct ssl_config_data* needle); bool Curl_clone_ssl_config(struct ssl_config_data* source, @@ -69,6 +73,14 @@ void Curl_ssl_kill_session(struct curl_ssl_session *session); /* delete a session from the cache */ void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid); +/* get N random bytes into the buffer */ +void Curl_ssl_random(struct SessionHandle *data, unsigned char *buffer, + size_t length); +void Curl_ssl_md5sum(unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *md5sum, /* output */ + size_t md5len); + #define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */ #else -- cgit v1.2.3