Changeset 164352e for lib/ssl_client.h
- Timestamp:
- 2011-12-24T18:02:39Z (12 years ago)
- Branches:
- master
- Children:
- 34ded90
- Parents:
- e306fbf (diff), 96f954d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/ssl_client.h
re306fbf r164352e 40 40 #define SSL_NOHANDSHAKE 1 41 41 #define SSL_AGAIN 2 42 #define VERIFY_CERT_ERROR 2 43 #define VERIFY_CERT_INVALID 4 44 #define VERIFY_CERT_REVOKED 8 45 #define VERIFY_CERT_SIGNER_NOT_FOUND 16 46 #define VERIFY_CERT_SIGNER_NOT_CA 32 47 #define VERIFY_CERT_INSECURE_ALGORITHM 64 48 #define VERIFY_CERT_NOT_ACTIVATED 128 49 #define VERIFY_CERT_EXPIRED 256 50 #define VERIFY_CERT_WRONG_HOSTNAME 512 42 51 43 52 extern int ssl_errno; 44 53 45 54 /* This is what your callback function should look like. */ 46 typedef gboolean (*ssl_input_function)(gpointer, void*, b_input_condition);55 typedef gboolean (*ssl_input_function)(gpointer, int, void*, b_input_condition); 47 56 48 57 … … 53 62 ready to be used for SSL traffic. This is all done asynchronously, no 54 63 blocking I/O! (Except for the DNS lookups, for now...) */ 55 G_MODULE_EXPORT void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data );64 G_MODULE_EXPORT void *ssl_connect( char *host, int port, gboolean verify, ssl_input_function func, gpointer data ); 56 65 57 66 /* Start an SSL session on an existing fd. Useful for STARTTLS functionality, 58 67 for example in Jabber. */ 59 G_MODULE_EXPORT void *ssl_starttls( int fd, ssl_input_function func, gpointer data );68 G_MODULE_EXPORT void *ssl_starttls( int fd, char *hostname, gboolean verify, ssl_input_function func, gpointer data ); 60 69 61 70 /* Obviously you need special read/write functions to read data. */ … … 90 99 G_MODULE_EXPORT b_input_condition ssl_getdirection( void *conn ); 91 100 101 /* Converts a verification bitfield passed to ssl_input_function into 102 a more useful string. Or NULL if it had no useful bits set. */ 103 G_MODULE_EXPORT char *ssl_verify_strerror( int code ); 104 92 105 G_MODULE_EXPORT size_t ssl_des3_encrypt(const unsigned char *key, size_t key_len, const unsigned char *input, size_t input_len, const unsigned char *iv, unsigned char **res);
Note: See TracChangeset
for help on using the changeset viewer.