Go to the documentation of this file.00001 #ifndef HEADER_CURL_MBEDTLS_H
00002 #define HEADER_CURL_MBEDTLS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "curl_setup.h"
00026
00027 #ifdef USE_MBEDTLS
00028
00029 #include <mbedtls/sha256.h>
00030
00031
00032 int Curl_mbedtls_init(void);
00033 void Curl_mbedtls_cleanup(void);
00034 int Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex);
00035
00036 CURLcode Curl_mbedtls_connect(struct connectdata *conn, int sockindex);
00037
00038 CURLcode Curl_mbedtls_connect_nonblocking(struct connectdata *conn,
00039 int sockindex,
00040 bool *done);
00041
00042
00043
00044 void Curl_mbedtls_close_all(struct Curl_easy *data);
00045
00046
00047 void Curl_mbedtls_close(struct connectdata *conn, int sockindex);
00048
00049 void Curl_mbedtls_session_free(void *ptr);
00050 size_t Curl_mbedtls_version(char *buffer, size_t size);
00051 int Curl_mbedtls_shutdown(struct connectdata *conn, int sockindex);
00052
00053
00054 #define have_curlssl_pinnedpubkey 1
00055
00056
00057 #define curlssl_init() Curl_mbedtls_init()
00058 #define curlssl_cleanup() Curl_mbedtls_cleanup()
00059 #define curlssl_connect Curl_mbedtls_connect
00060 #define curlssl_connect_nonblocking Curl_mbedtls_connect_nonblocking
00061 #define curlssl_session_free(x) Curl_mbedtls_session_free(x)
00062 #define curlssl_close_all Curl_mbedtls_close_all
00063 #define curlssl_close Curl_mbedtls_close
00064 #define curlssl_shutdown(x,y) 0
00065 #define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN)
00066 #define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN)
00067 #define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
00068 #define curlssl_version Curl_mbedtls_version
00069 #define curlssl_check_cxn(x) (x=x, -1)
00070 #define curlssl_data_pending(x,y) Curl_mbedtls_data_pending(x, y)
00071 #define CURL_SSL_BACKEND CURLSSLBACKEND_MBEDTLS
00072 #define curlssl_sha256sum(a,b,c,d) mbedtls_sha256(a,b,c,0)
00073
00074
00075
00076
00077 #define curlssl_random(x,y,z) (x=x, y=y, z=z, CURLE_NOT_BUILT_IN)
00078
00079 #endif
00080 #endif