Skip to content

Instantly share code, notes, and snippets.

View georgebashi's full-sized avatar

George Bashi georgebashi

View GitHub Profile
@kmosher
kmosher / ngx-detect-heartbleed.patch
Last active August 29, 2015 13:58
Add heartbleed attack logging to nginx
diff --git a/nginx-1.5.8/src/event/ngx_event_openssl.c b/nginx-1.5.8/src/event/ngx_event_openssl.c
index ee66713..1ea58e1 100644
--- a/nginx-1.5.8/src/event/ngx_event_openssl.c
+++ b/nginx-1.5.8/src/event/ngx_event_openssl.c
@@ -18,6 +18,9 @@ typedef struct {
static int ngx_ssl_verify_callback(int ok, X509_STORE_CTX *x509_store);
static void ngx_ssl_info_callback(const ngx_ssl_conn_t *ssl_conn, int where,
int ret);
+static void ngx_ssl_msg_callback(
+ int write_p, int version, int content_type,