Tim Ruehsen <[email protected]> writes: > case secure_protocol_tlsv1: > allowed_protocols[0] = GNUTLS_TLS1_0; > allowed_protocols[1] = GNUTLS_TLS1_1; > allowed_protocols[2] = GNUTLS_TLS1_2; > err = gnutls_protocol_set_priority (session, allowed_protocols); > break; > - > + case secure_protocol_tlsv1_1: > + allowed_protocols[0] = GNUTLS_TLS1_1; > + allowed_protocols[2] = GNUTLS_TLS1_2; > + err = gnutls_protocol_set_priority (session, allowed_protocols); > + break; > + case secure_protocol_tlsv1_2: > + allowed_protocols[2] = GNUTLS_TLS1_2; > + err = gnutls_protocol_set_priority (session, allowed_protocols); > + break; > default:
allowed_protocols is a 0 terminated list. So this last chunk should be: > case secure_protocol_tlsv1: > allowed_protocols[0] = GNUTLS_TLS1_0; > allowed_protocols[1] = GNUTLS_TLS1_1; > allowed_protocols[2] = GNUTLS_TLS1_2; > err = gnutls_protocol_set_priority (session, allowed_protocols); > break; > > + case secure_protocol_tlsv1_1: > + allowed_protocols[0] = GNUTLS_TLS1_1; > + allowed_protocols[1] = GNUTLS_TLS1_2; > + err = gnutls_protocol_set_priority (session, allowed_protocols); > + break; > + > + case secure_protocol_tlsv1_2: > + allowed_protocols[0] = GNUTLS_TLS1_2; > + err = gnutls_protocol_set_priority (session, allowed_protocols); > + break; > default: ACK with this change. I prefer if we leave an empty line between the "break" and the next "case", what do you think? Regards, Giuseppe
