From 3fb9b6e14a2aa742929044af1004974d1085899a Mon Sep 17 00:00:00 2001
From: "Thierry FOURNIER / OZON.IO" <thierry.fournier@ozon.io>
Date: Tue, 4 Oct 2016 11:41:57 +0200
Subject: [PATCH 1/5] MINOR: ssl: export the function ssl_sock_get_serial()

This function will be used for the cli import/export of certificates.
---
 include/proto/ssl_sock.h | 1 +
 src/ssl_sock.c           | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/proto/ssl_sock.h b/include/proto/ssl_sock.h
index cb9a1e9..c527471 100644
--- a/include/proto/ssl_sock.h
+++ b/include/proto/ssl_sock.h
@@ -52,6 +52,7 @@ int ssl_sock_load_ca(struct bind_conf *bind_conf, struct proxy *px);
 void ssl_sock_free_ca(struct bind_conf *bind_conf);
 const char *ssl_sock_get_cipher_name(struct connection *conn);
 const char *ssl_sock_get_proto_version(struct connection *conn);
+int ssl_sock_get_serial(X509 *crt, struct chunk *out);
 char *ssl_sock_get_version(struct connection *conn);
 void ssl_sock_set_servername(struct connection *conn, const char *hostname);
 int ssl_sock_get_cert_used_sess(struct connection *conn);
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 0535a3b..375f3b8 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -3181,8 +3181,7 @@ const char *ssl_sock_get_proto_version(struct connection *conn)
  * Returns 1 if serial is found and copied, 0 if no serial found and
  * -1 if output is not large enough.
  */
-static int
-ssl_sock_get_serial(X509 *crt, struct chunk *out)
+int ssl_sock_get_serial(X509 *crt, struct chunk *out)
 {
 	ASN1_INTEGER *serial;
 
-- 
2.9.5

