Loading src/common/tortls.c +9 −0 Original line number Diff line number Diff line Loading @@ -430,6 +430,15 @@ tor_tls_new(int sock, int isServer, int use_no_cert) return result; } /** Return whether this tls initiated the connect (client) or * received it (server). */ int tor_tls_is_server(tor_tls *tls) { tor_assert(tls); return tls->isServer; } /** Release resources associated with a TLS object. Does not close the * underlying file descriptor. */ Loading src/common/tortls.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ void tor_tls_free_all(void); int tor_tls_context_new(crypto_pk_env_t *rsa, int isServer, const char *nickname, unsigned int key_lifetime); tor_tls *tor_tls_new(int sock, int is_server, int use_no_cert); int tor_tls_is_server(tor_tls *tls); void tor_tls_free(tor_tls *tls); int tor_tls_peer_has_cert(tor_tls *tls); int tor_tls_get_peer_cert_nickname(tor_tls *tls, char *buf, size_t buflen); Loading Loading
src/common/tortls.c +9 −0 Original line number Diff line number Diff line Loading @@ -430,6 +430,15 @@ tor_tls_new(int sock, int isServer, int use_no_cert) return result; } /** Return whether this tls initiated the connect (client) or * received it (server). */ int tor_tls_is_server(tor_tls *tls) { tor_assert(tls); return tls->isServer; } /** Release resources associated with a TLS object. Does not close the * underlying file descriptor. */ Loading
src/common/tortls.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ void tor_tls_free_all(void); int tor_tls_context_new(crypto_pk_env_t *rsa, int isServer, const char *nickname, unsigned int key_lifetime); tor_tls *tor_tls_new(int sock, int is_server, int use_no_cert); int tor_tls_is_server(tor_tls *tls); void tor_tls_free(tor_tls *tls); int tor_tls_peer_has_cert(tor_tls *tls); int tor_tls_get_peer_cert_nickname(tor_tls *tls, char *buf, size_t buflen); Loading