tls/securetransport: fix indentation
This commit is contained in:
@@ -10,8 +10,8 @@
|
|||||||
#include "sock.h"
|
#include "sock.h"
|
||||||
|
|
||||||
struct _tls {
|
struct _tls {
|
||||||
xmpp_ctx_t *ctx; /* do we need this? */
|
xmpp_ctx_t *ctx; /* do we need this? */
|
||||||
sock_t sock;
|
sock_t sock;
|
||||||
|
|
||||||
SSLContextRef sslctx;
|
SSLContextRef sslctx;
|
||||||
};
|
};
|
||||||
@@ -141,7 +141,7 @@ void tls_free(tls_t *tls)
|
|||||||
{
|
{
|
||||||
CFRelease(tls->sslctx);
|
CFRelease(tls->sslctx);
|
||||||
|
|
||||||
xmpp_free(tls->ctx, tls);
|
xmpp_free(tls->ctx, tls);
|
||||||
}
|
}
|
||||||
|
|
||||||
int tls_set_credentials(tls_t *tls, const char *cafilename)
|
int tls_set_credentials(tls_t *tls, const char *cafilename)
|
||||||
@@ -161,15 +161,15 @@ int tls_set_credentials(tls_t *tls, const char *cafilename)
|
|||||||
|
|
||||||
SSLSetCertificate(tls->sslctx, certRefs);
|
SSLSetCertificate(tls->sslctx, certRefs);
|
||||||
*/
|
*/
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tls_start(tls_t *tls)
|
int tls_start(tls_t *tls)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Since we're non-blocking, loop the connect call until it
|
/* Since we're non-blocking, loop the connect call until it
|
||||||
succeeds or fails */
|
succeeds or fails */
|
||||||
do {
|
do {
|
||||||
ret = SSLHandshake(tls->sslctx);
|
ret = SSLHandshake(tls->sslctx);
|
||||||
} while (ret == errSSLWouldBlock);
|
} while (ret == errSSLWouldBlock);
|
||||||
@@ -197,8 +197,8 @@ int tls_is_recoverable(int error)
|
|||||||
|
|
||||||
int tls_error(tls_t *tls)
|
int tls_error(tls_t *tls)
|
||||||
{
|
{
|
||||||
/* todo: some kind of error polling/dump */
|
/* todo: some kind of error polling/dump */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tls_pending(tls_t *tls)
|
int tls_pending(tls_t *tls)
|
||||||
@@ -232,6 +232,6 @@ int tls_write(tls_t *tls, const void * const buff, const size_t len)
|
|||||||
|
|
||||||
int tls_clear_pending_write(tls_t *tls)
|
int tls_clear_pending_write(tls_t *tls)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user