configure: add stuff for spell checking
[rofl0r-ixchat.git] / src / common / ssl.h
blob26eb0f883c911e0d298322b28df0f38dc5d92b6b
1 /*
2 ...
3 */
5 struct cert_info {
6 char subject[256];
7 char *subject_word[12];
8 char issuer[256];
9 char *issuer_word[12];
10 char algorithm[32];
11 int algorithm_bits;
12 char sign_algorithm[32];
13 int sign_algorithm_bits;
14 char notbefore[32];
15 char notafter[32];
17 int rsa_tmp_bits;
20 struct chiper_info {
21 char version[16];
22 char chiper[24];
23 int chiper_bits;
26 SSL_CTX *_SSL_context_init (void (*info_cb_func), int server);
27 #define _SSL_context_free(a) SSL_CTX_free(a);
29 SSL *_SSL_socket (SSL_CTX *ctx, int sd);
30 char *_SSL_set_verify (SSL_CTX *ctx, void *(verify_callback), char *cacert);
32 int SSL_connect(SSL *);
33 int SSL_accept(SSL *);
34 int SSL_get_fd(SSL *);
36 void _SSL_close (SSL * ssl);
38 int _SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl);
39 struct chiper_info *_SSL_get_cipher_info (SSL * ssl);
41 /*char *_SSL_add_keypair (SSL_CTX *ctx, char *privkey, char *cert);*/
42 /*void _SSL_add_random_keypair(SSL_CTX *ctx, int bits);*/
44 int _SSL_send (SSL * ssl, char *buf, int len);
45 int _SSL_recv (SSL * ssl, char *buf, int len);
47 /* misc */
48 /*void broke_oneline (char *oneline, char *parray[]);*/
50 /*char *_SSL_do_cipher_base64(char *buf, int buf_len, char *key, int operation);*/ /* must be freed */
52 /*void *_SSL_get_sess_obj(SSL *ssl, int type);*/ /* NOT must be freed */
53 #define _SSL_get_sess_pkey(a) _SSL_get_sess_obj(a, 0)
54 #define _SSL_get_sess_prkey(a) _SSL_get_sess_obj(a, 1)
55 #define _SSL_get_sess_x509(a) _SSL_get_sess_obj(a, 2)
56 /*char *_SSL_get_obj_base64(void *s, int type);*/ /* must be freed */
57 #define _SSL_get_pkey_base64(a) _SSL_get_obj_base64(a, 0)
58 #define _SSL_get_prkey_base64(a) _SSL_get_obj_base64(a, 1)
59 #define _SSL_get_x509_base64(a) _SSL_get_obj_base64(a, 2)
60 /*char *_SSL_get_ctx_obj_base64(SSL_CTX *ctx, int type);*/ /* must be freed */
61 #define _SSL_get_ctx_pkey_base64(a) _SSL_get_ctx_obj_base64(a, 0)
62 #define _SSL_get_ctx_prkey_base64(a) _SSL_get_ctx_obj_base64(a, 1)
63 #define _SSL_get_ctx_x509_base64(a) _SSL_get_ctx_obj_base64(a, 2)
65 /*int _SSL_verify_x509(X509 *x509);*/