X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstream-ssl.c;h=b2a9f8453f61e59fd4d605c1a245023d2ea4120b;hb=a23aab1fc2f66b63ba9b7e4b9c9a8f6d58c367d0;hp=70b15f0da9418907c63f884f79ae5d8bf87454aa;hpb=d295e8e97acae13552a5b220d3fbcff8201064a2;p=openvswitch diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index 70b15f0d..b2a9f845 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -45,7 +45,7 @@ #include "timeval.h" #include "vlog.h" -VLOG_DEFINE_THIS_MODULE(stream_ssl) +VLOG_DEFINE_THIS_MODULE(stream_ssl); /* Active SSL. */ @@ -385,7 +385,7 @@ do_ca_cert_bootstrap(struct stream *stream) file = fdopen(fd, "w"); if (!file) { - int error = errno; + error = errno; VLOG_ERR("could not bootstrap CA cert: fdopen failed: %s", strerror(error)); unlink(ca_cert.file_name); @@ -402,7 +402,7 @@ do_ca_cert_bootstrap(struct stream *stream) } if (fclose(file)) { - int error = errno; + error = errno; VLOG_ERR("could not bootstrap CA cert: writing %s failed: %s", ca_cert.file_name, strerror(error)); unlink(ca_cert.file_name); @@ -921,7 +921,7 @@ pssl_accept(struct pstream *pstream, struct stream **new_streamp) new_fd = accept(pssl->fd, &sin, &sin_len); if (new_fd < 0) { - int error = errno; + error = errno; if (error != EAGAIN) { VLOG_DBG_RL(&rl, "accept: %s", strerror(error)); } @@ -988,7 +988,9 @@ do_ssl_init(void) SSL_library_init(); SSL_load_error_strings(); - method = TLSv1_method(); + /* New OpenSSL changed TLSv1_method() to return a "const" pointer, so the + * cast is needed to avoid a warning with those newer versions. */ + method = (SSL_METHOD *) TLSv1_method(); if (method == NULL) { VLOG_ERR("TLSv1_method: %s", ERR_error_string(ERR_get_error(), NULL)); return ENOPROTOOPT;