#include <openssl/base.h>
+// TODO(davidben): bssl client does not work on Windows.
+#if !defined(OPENSSL_WINDOWS)
+
#include <string>
#include <vector>
#include <arpa/inet.h>
#include <fcntl.h>
#include <netdb.h>
+#include <netinet/in.h>
#include <sys/select.h>
#include <unistd.h>
#else
"The hostname and port of the server to connect to, e.g. foo.com:443",
},
{
+ "-cipher", false,
+ "An OpenSSL-style cipher suite string that configures the offered ciphers",
+ },
+ {
"", false, "",
},
};
SSL_CTX_set_keylog_bio(ctx, keylog_bio);
}
+ if (args_map.count("-cipher") != 0) {
+ SSL_CTX_set_cipher_list(ctx, args_map["-cipher"].c_str());
+ }
+
int sock = -1;
if (!Connect(&sock, args_map["-connect"])) {
return false;
SSL_CTX_free(ctx);
return ok;
}
+
+#endif // !OPENSSL_WINDOWS
\ No newline at end of file