{
struct gc_arena gc = gc_new();
const char *peer_ciphers = tls_peer_ncp_list(peer_info, &gc);
- msg(M_INFO, "PUSH: No common cipher between server and client."
- "Expect this connection not to work. "
- "Server ncp-ciphers: '%s', client supported ciphers '%s'",
- o->ncp_ciphers, peer_ciphers);
+ if (strlen(peer_ciphers) > 0)
+ {
+ msg(M_INFO, "PUSH: No common cipher between server and "
+ "client. Expect this connection not to work. Server "
+ "ncp-ciphers: '%s', client supported ciphers '%s'",
+ o->ncp_ciphers, peer_ciphers);
+ }
+ else
+ {
+ msg(M_INFO, "No NCP data received from peer, falling back "
+ "to --cipher '%s'. Peer reports in OCC --cipher '%s'",
+ o->ciphername, np(tls_multi->remote_ciphername));
+ }
gc_free(&gc);
}
}
const char *peer_ncp_list = tls_peer_ncp_list(peer_info, &gc_tmp);
+ /* non-NCP client without OCC? "assume nothing" */
+ if (remote_cipher == NULL)
+ {
+ remote_cipher = "";
+ }
+
char *tmp_ciphers = string_alloc(server_list, &gc_tmp);
const char *token = strsep(&tmp_ciphers, ":");