MbedTLS: Don't include the sentinel in suites count calculation

This commit is contained in:
Aaron Jones 2016-09-01 20:57:07 +00:00
parent df51e80717
commit 0db0805ed5

View file

@ -508,7 +508,7 @@ rb_setup_ssl_server(const char *const certfile, const char *keyfile,
rb_lib_log("rb_setup_ssl_server: Using default ciphersuites"); rb_lib_log("rb_setup_ssl_server: Using default ciphersuites");
rb_ciphersuites = rb_mbedtls_ciphersuites; rb_ciphersuites = rb_mbedtls_ciphersuites;
suites_count = sizeof(rb_mbedtls_ciphersuites) / sizeof(rb_mbedtls_ciphersuites[0]); suites_count = (sizeof(rb_mbedtls_ciphersuites) / sizeof(rb_mbedtls_ciphersuites[0])) - 1;
} }
mbedtls_ssl_conf_ciphersuites(&newcfg->server_cfg, rb_ciphersuites); mbedtls_ssl_conf_ciphersuites(&newcfg->server_cfg, rb_ciphersuites);