ringbuffer: ensure same ptr for SSL_read()