Skip to content

Commit 6d6f83e

Browse files
committed
CDRIVER-1941 Fix libressl build
1 parent 5714a10 commit 6d6f83e

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

src/mongoc/mongoc-init.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
# include "mongoc-ssl.h"
2929
# ifdef MONGOC_ENABLE_SSL_OPENSSL
3030
# include "mongoc-openssl-private.h"
31+
#elif defined(MONGOC_ENABLE_SSL_LIBRESSL)
32+
# include "tls.h"
3133
# endif
3234
#endif
3335
#include "mongoc-thread-private.h"

src/mongoc/mongoc-libressl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ mongoc_libressl_setup_certificate (mongoc_stream_tls_libressl_t *libressl,
4545
return false;
4646
}
4747

48-
file = tls_load_file (opt->pem_file, &file_len, opt->pem_pwd);
48+
file = tls_load_file (opt->pem_file, &file_len, (char *)opt->pem_pwd);
4949
if (!file) {
5050
return false;
5151
}

src/mongoc/mongoc-ssl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ mongoc_ssl_extract_subject (const char *filename, const char *passphrase)
8080
#elif defined(MONGOC_ENABLE_SSL_LIBRESSL)
8181
MONGOC_WARNING ("libtls doesn't support automatically extracting subject from "
8282
"certificate to use with authentication");
83+
retval = NULL;
8384
#elif defined(MONGOC_ENABLE_SSL_SECURE_TRANSPORT)
8485
retval = _mongoc_secure_transport_extract_subject (filename, passphrase);
8586
#elif defined(MONGOC_ENABLE_SSL_SECURE_CHANNEL)

src/mongoc/mongoc-stream-tls-libressl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,6 @@ mongoc_stream_tls_libressl_new (mongoc_stream_t *base_stream,
501501

502502
}
503503

504-
libressl->n = streams++;
505504
mongoc_counter_streams_active_inc();
506505
RETURN((mongoc_stream_t *)tls);
507506
}

0 commit comments

Comments
 (0)