diff --git a/src/network/socket.c b/src/network/socket.c
index 9fe629a16..e8ed93679 100644
--- a/src/network/socket.c
+++ b/src/network/socket.c
@@ -260,7 +260,7 @@ make_connection(struct socket *socket, struct uri *uri,
 	char *host = get_uri_string(uri, URI_DNS_HOST);
 	struct connect_info *connect_info;
 	enum dns_result result;
-	enum blacklist_flags verify;
+	blacklist_flags_T verify;
 
 	socket->ops->set_timeout(socket, connection_state(0));
 
@@ -281,7 +281,7 @@ make_connection(struct socket *socket, struct uri *uri,
 	 * complete_connect_socket() work from the HTTP implementation. */
 	socket->need_ssl = get_protocol_need_ssl(uri->protocol);
 	if (!socket->set_no_tls) {
-		enum blacklist_flags flags = get_blacklist_flags(uri);
+		blacklist_flags_T flags = get_blacklist_flags(uri);
 		socket->no_tls = ((flags & SERVER_BLACKLIST_NO_TLS) != 0);
 		socket->set_no_tls = 1;
 	}
diff --git a/src/protocol/http/blacklist.c b/src/protocol/http/blacklist.c
index 1a708d1b3..848c659a8 100644
--- a/src/protocol/http/blacklist.c
+++ b/src/protocol/http/blacklist.c
@@ -19,7 +19,7 @@
 struct blacklist_entry {
 	LIST_HEAD(struct blacklist_entry);
 
-	enum blacklist_flags flags;
+	blacklist_flags_T flags;
 	char host[1]; /* Must be last. */
 };
 
@@ -44,7 +44,7 @@ get_blacklist_entry(struct uri *uri)
 }
 
 void
-add_blacklist_entry(struct uri *uri, enum blacklist_flags flags)
+add_blacklist_entry(struct uri *uri, blacklist_flags_T flags)
 {
 	struct blacklist_entry *entry = get_blacklist_entry(uri);
 
@@ -62,7 +62,7 @@ add_blacklist_entry(struct uri *uri, enum blacklist_flags flags)
 }
 
 void
-del_blacklist_entry(struct uri *uri, enum blacklist_flags flags)
+del_blacklist_entry(struct uri *uri, blacklist_flags_T flags)
 {
 	struct blacklist_entry *entry = get_blacklist_entry(uri);
 
@@ -75,7 +75,7 @@ del_blacklist_entry(struct uri *uri, enum blacklist_flags flags)
 	mem_free(entry);
 }
 
-enum blacklist_flags
+blacklist_flags_T
 get_blacklist_flags(struct uri *uri)
 {
 	struct blacklist_entry *entry = get_blacklist_entry(uri);
diff --git a/src/protocol/http/blacklist.h b/src/protocol/http/blacklist.h
index 676ac5ff4..86f16d453 100644
--- a/src/protocol/http/blacklist.h
+++ b/src/protocol/http/blacklist.h
@@ -16,9 +16,11 @@ enum blacklist_flags {
 	SERVER_BLACKLIST_NO_CERT_VERIFY = 8,
 };
 
-void add_blacklist_entry(struct uri *, enum blacklist_flags);
-void del_blacklist_entry(struct uri *, enum blacklist_flags);
-enum blacklist_flags get_blacklist_flags(struct uri *);
+typedef unsigned char blacklist_flags_T;
+
+void add_blacklist_entry(struct uri *, blacklist_flags_T);
+void del_blacklist_entry(struct uri *, blacklist_flags_T);
+blacklist_flags_T get_blacklist_flags(struct uri *);
 void free_blacklist(void);
 
 #ifdef __cplusplus
diff --git a/src/protocol/http/http.h b/src/protocol/http/http.h
index 35205fb86..76949aebe 100644
--- a/src/protocol/http/http.h
+++ b/src/protocol/http/http.h
@@ -23,7 +23,7 @@ struct http_version {
 
 /** connection.info points to this in HTTP and local CGI connections. */
 struct http_connection_info {
-	enum blacklist_flags bl_flags;
+	blacklist_flags_T bl_flags;
 	struct http_version recv_version;
 	struct http_version sent_version;