From 7efcf1b04790f40b4327d5ed06786743832b6b5a Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Sun, 31 Mar 2013 15:08:43 -0500 Subject: [PATCH] processors now generate correct random masking keys --- websocketpp/processors/hybi13.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/websocketpp/processors/hybi13.hpp b/websocketpp/processors/hybi13.hpp index f8486948ec..470e5d9fb3 100644 --- a/websocketpp/processors/hybi13.hpp +++ b/websocketpp/processors/hybi13.hpp @@ -517,9 +517,7 @@ public: if (masked) { // Generate masking key. - // TODO: figure out where the RNG should live - // TODO: actually use a RNG here - key.i = 0; + key.i = m_rng(); frame::extended_header e(i.size(),key.i); out->set_header(frame::prepare_header(h,e)); @@ -903,9 +901,7 @@ protected: if (masked) { // Generate masking key. - // TODO: figure out where the RNG should live - // TODO: actually use a RNG here - key.i = 0; + key.i = m_rng(); frame::extended_header e(payload.size(),key.i); out->set_header(frame::prepare_header(h,e));