diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-30 18:08:25 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-30 18:08:25 +0000 |
commit | 0d16792e387ccb9d71afe31101a7e77eb70314ef (patch) | |
tree | 0ea168a3875aa2508b9af4f5f902abf7ae6c1380 /src | |
parent | 9e100a46585ab725e36660afdf21bd1e66400436 (diff) | |
download | rspamd-0d16792e387ccb9d71afe31101a7e77eb70314ef.tar.gz rspamd-0d16792e387ccb9d71afe31101a7e77eb70314ef.zip |
Set peer's key properly.
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/http.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c index 0500f18ef..dc4774c2f 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -908,8 +908,6 @@ rspamd_http_connection_reset (struct rspamd_http_connection *conn) REF_RELEASE (priv->buf); } - priv->encrypted = FALSE; - rspamd_http_parser_reset (conn); if (priv->out != NULL) { @@ -1039,6 +1037,8 @@ rspamd_http_connection_write_message (struct rspamd_http_connection *conn, bodylen += crypto_box_NONCEBYTES + crypto_box_ZEROBYTES; } + peer_key = (struct rspamd_http_keypair *)msg->peer_key; + if (conn->type == RSPAMD_HTTP_SERVER) { /* Format reply */ if (msg->method < HTTP_SYMBOLS) { @@ -1094,7 +1094,6 @@ rspamd_http_connection_write_message (struct rspamd_http_connection *conn, bodylen); } if (encrypted) { - peer_key = (struct rspamd_http_keypair *)msg->peer_key; memcpy (id, peer_key->id, sizeof (id)); b32_key = rspamd_encode_base32 (priv->local_key->pk, sizeof (priv->local_key->pk)); |