Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-06-03 23:45:30 +0300
committerDavid Benjamin <davidben@google.com>2016-06-06 17:49:09 +0300
commite7b3ce58ad100adbe738eae6b38e0fa72542663e (patch)
treed76fedf7eb87c6c5c020c2424631b28613b718f7 /crypto/bio
parentdbec90b62328e483323394f93e89fe657f4568c2 (diff)
Add BIO_set_conn_int_port.
Make building against software that expects OpenSSL easier. Change-Id: I1af090ae8208218d6e226ee0baf51053699d85cc Reviewed-on: https://boringssl-review.googlesource.com/8141 Reviewed-by: Steven Valdez <svaldez@google.com> Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/connect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/bio/connect.c b/crypto/bio/connect.c
index 01d49b1b..45694960 100644
--- a/crypto/bio/connect.c
+++ b/crypto/bio/connect.c
@@ -538,6 +538,12 @@ int BIO_set_conn_port(BIO *bio, const char *port_str) {
return BIO_ctrl(bio, BIO_C_SET_CONNECT, 1, (void*) port_str);
}
+int BIO_set_conn_int_port(BIO *bio, const int *port) {
+ char buf[DECIMAL_SIZE(int) + 1];
+ BIO_snprintf(buf, sizeof(buf), "%d", *port);
+ return BIO_set_conn_port(bio, buf);
+}
+
int BIO_set_nbio(BIO *bio, int on) {
return BIO_ctrl(bio, BIO_C_SET_NBIO, on, NULL);
}