+static void
+ssl_send_cipher(conn_t *conn)
+{
+ size_t len;
+ uint8_t buf[512];
+ char cstring[256];
+ const char *p;
+ if(!IsSSL(conn))
+ return;
+
+ p = rb_ssl_get_cipher(conn->mod_fd);
+
+ if(p == NULL)
+ return;
+
+ rb_strlcpy(cstring, p, sizeof(cstring));
+
+ buf[0] = 'C';
+ uint32_to_buf(&buf[1], conn->id);
+ strcpy((char *) &buf[5], cstring);
+ len = (strlen(cstring) + 1) + 5;
+ mod_cmd_write_queue(conn->ctl, buf, len);
+}
+
+static void
+ssl_send_certfp(conn_t *conn)
+{
+ uint8_t buf[13 + RB_SSL_CERTFP_LEN];
+
+ int len = rb_get_ssl_certfp(conn->mod_fd, &buf[13], certfp_method);
+ if (!len)
+ return;
+
+ lrb_assert(len <= RB_SSL_CERTFP_LEN);
+ buf[0] = 'F';
+ uint32_to_buf(&buf[1], conn->id);
+ uint32_to_buf(&buf[5], certfp_method);
+ uint32_to_buf(&buf[9], len);
+ mod_cmd_write_queue(conn->ctl, buf, 13 + len);
+}
+
+static void
+ssl_send_open(conn_t *conn)
+{
+ uint8_t buf[5];
+
+ buf[0] = 'O';
+ uint32_to_buf(&buf[1], conn->id);
+ mod_cmd_write_queue(conn->ctl, buf, 5);
+}
+