Skip to content

Commit bf1348e

Browse files
committed
add required internal TLS API's for dummy and schannel
Signed-off-by: Steffen Jaeckel <[email protected]>
1 parent 795675d commit bf1348e

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

src/tls.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ struct _xmpp_tlscert_t {
3131
dnsname_t *dnsnames;
3232
};
3333

34+
/* provided by the real TLS implementation */
35+
3436
void tls_initialize(void);
3537
void tls_shutdown(void);
3638

@@ -55,6 +57,8 @@ int tls_write(tls_t *tls, const void *buff, size_t len);
5557
int tls_clear_pending_write(tls_t *tls);
5658
int tls_is_recoverable(int error);
5759

60+
/* provided by tls.c */
61+
5862
xmpp_tlscert_t *tlscert_new(xmpp_ctx_t *ctx);
5963
int tlscert_add_dnsname(xmpp_tlscert_t *cert, const char *dnsname);
6064

src/tls_dummy.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ void tls_free(tls_t *tls)
6161
return;
6262
}
6363

64+
xmpp_tlscert_t *tls_peer_cert(xmpp_conn_t *conn)
65+
{
66+
UNUSED(conn);
67+
return NULL;
68+
}
69+
6470
int tls_set_credentials(tls_t *tls, const char *cafilename)
6571
{
6672
UNUSED(tls);

src/tls_schannel.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ void tls_free(tls_t *tls)
222222
return;
223223
}
224224

225+
xmpp_tlscert_t *tls_peer_cert(xmpp_conn_t *conn)
226+
{
227+
/* always fail */
228+
xmpp_error(conn->ctx, "tls", "tls_peer_cert() not implemented");
229+
return NULL;
230+
}
231+
225232
int tls_set_credentials(tls_t *tls, const char *cafilename)
226233
{
227234
UNUSED(tls);

0 commit comments

Comments
 (0)