int verify_ssl_cipher(SSL *ssl) { unsigned char *cipher; #ifdef HAVE_SSLV2_CLIENT_METHOD if (SSL_get_ssl_method(ssl) == SSLv2_client_method()) return S_INSECURE_CIPHER; #endif #ifdef HAVE_SSLV3_CLIENT_METHOD if (SSL_get_ssl_method(ssl) == SSLv3_client_method()) return S_INSECURE_CIPHER; #endif if (SSL_get_cipher_bits(ssl, NULL) < 112) return S_INSECURE_CIPHER; cipher = cast_uchar SSL_get_cipher_name(ssl); if (cipher && strstr(cast_const_char cipher, "RC4-")) return S_INSECURE_CIPHER; return 0; }
int eventer_ssl_get_method(eventer_ssl_ctx_t *ctx) { return SSL_get_ssl_method(ctx->ssl)->version; }