Changeset 5ebff60 for lib/ssl_client.h


Ignore:
Timestamp:
2015-02-20T22:50:54Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
0b9daac, 3d45471, 7733b8c
Parents:
af359b4
git-author:
Indent <please@…> (19-02-15 05:47:20)
git-committer:
dequis <dx@…> (20-02-15 22:50:54)
Message:

Reindent everything to K&R style with tabs

Used uncrustify, with the configuration file in ./doc/uncrustify.cfg

Commit author set to "Indent <please@…>" so that it's easier to
skip while doing git blame.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/ssl_client.h

    raf359b4 r5ebff60  
    1   /********************************************************************\
     1/********************************************************************\
    22  * BitlBee -- An IRC to other IM-networks gateway                     *
    33  *                                                                    *
     
    5757
    5858/* Perform any global initialization the SSL library might need. */
    59 G_MODULE_EXPORT void ssl_init( void );
     59G_MODULE_EXPORT void ssl_init(void);
    6060
    6161/* Connect to host:port, call the given function when the connection is
    6262   ready to be used for SSL traffic. This is all done asynchronously, no
    6363   blocking I/O! (Except for the DNS lookups, for now...) */
    64 G_MODULE_EXPORT void *ssl_connect( char *host, int port, gboolean verify, ssl_input_function func, gpointer data );
     64G_MODULE_EXPORT void *ssl_connect(char *host, int port, gboolean verify, ssl_input_function func, gpointer data);
    6565
    6666/* Start an SSL session on an existing fd. Useful for STARTTLS functionality,
    6767   for example in Jabber. */
    68 G_MODULE_EXPORT void *ssl_starttls( int fd, char *hostname, gboolean verify, ssl_input_function func, gpointer data );
     68G_MODULE_EXPORT void *ssl_starttls(int fd, char *hostname, gboolean verify, ssl_input_function func, gpointer data);
    6969
    7070/* Obviously you need special read/write functions to read data. */
    71 G_MODULE_EXPORT int ssl_read( void *conn, char *buf, int len );
    72 G_MODULE_EXPORT int ssl_write( void *conn, const char *buf, int len );
     71G_MODULE_EXPORT int ssl_read(void *conn, char *buf, int len);
     72G_MODULE_EXPORT int ssl_write(void *conn, const char *buf, int len);
    7373
    7474/* Now needed by most SSL libs. See for more info:
    7575   http://www.gnu.org/software/gnutls/manual/gnutls.html#index-gnutls_005frecord_005fcheck_005fpending-209
    7676   http://www.openssl.org/docs/ssl/SSL_pending.html
    77    
     77
    7878   Required because OpenSSL empties the TCP buffer completely but doesn't
    7979   necessarily give us all the unencrypted data. Or maybe you didn't ask
    8080   for all of it because your buffer is too small.
    81    
     81
    8282   Returns 0 if there's nothing left, 1 if there's more data. */
    83 G_MODULE_EXPORT int ssl_pending( void *conn );
     83G_MODULE_EXPORT int ssl_pending(void *conn);
    8484
    8585/* Abort the SSL connection and disconnect the socket. Do not use close()
    8686   directly, both the SSL library and the peer will be unhappy! */
    87 G_MODULE_EXPORT void ssl_disconnect( void *conn_ );
     87G_MODULE_EXPORT void ssl_disconnect(void *conn_);
    8888
    8989/* Get the fd for this connection, you will usually need it for event
    9090   handling. */
    91 G_MODULE_EXPORT int ssl_getfd( void *conn );
     91G_MODULE_EXPORT int ssl_getfd(void *conn);
    9292
    9393/* This function returns B_EV_IO_READ/WRITE. With SSL connections it's
     
    9797   adding an event handler to the queue. (And it should perform exactly
    9898   the same action as the handler that just received the SSL_AGAIN.) */
    99 G_MODULE_EXPORT b_input_condition ssl_getdirection( void *conn );
     99G_MODULE_EXPORT b_input_condition ssl_getdirection(void *conn);
    100100
    101101/* Converts a verification bitfield passed to ssl_input_function into
    102102   a more useful string. Or NULL if it had no useful bits set. */
    103 G_MODULE_EXPORT char *ssl_verify_strerror( int code );
     103G_MODULE_EXPORT char *ssl_verify_strerror(int code);
    104104
    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);
     105G_MODULE_EXPORT size_t ssl_des3_encrypt(const unsigned char *key, size_t key_len, const unsigned char *input,
     106                                        size_t input_len, const unsigned char *iv, unsigned char **res);
Note: See TracChangeset for help on using the changeset viewer.