MbedTLS: Correct NULL checks for functions in line with other backends

This commit is contained in:
Aaron Jones 2016-09-15 12:38:00 +00:00
parent 988fedf212
commit ac62792970
No known key found for this signature in database
GPG key ID: EC6F86EE9CD840B5

View file

@ -534,6 +534,9 @@ rb_get_ssl_strerror(rb_fde_t *const F)
int int
rb_get_ssl_certfp(rb_fde_t *const F, uint8_t certfp[const RB_SSL_CERTFP_LEN], int method) rb_get_ssl_certfp(rb_fde_t *const F, uint8_t certfp[const RB_SSL_CERTFP_LEN], int method)
{ {
if(F == NULL || F->ssl == NULL)
return 0;
mbedtls_md_type_t md_type; mbedtls_md_type_t md_type;
int hashlen; int hashlen;
@ -590,7 +593,7 @@ rb_get_ssl_info(char *const buf, size_t len)
const char * const char *
rb_ssl_get_cipher(rb_fde_t *const F) rb_ssl_get_cipher(rb_fde_t *const F)
{ {
if(F == NULL || F->ssl == NULL || SSL_P(F) == NULL) if(F == NULL || F->ssl == NULL)
return NULL; return NULL;
static char buf[512]; static char buf[512];