Skip to content

Instantly share code, notes, and snippets.

@alanhuang122
Created July 1, 2018 20:57
Show Gist options
  • Save alanhuang122/85b9282d52e94a689e05a0c04a36676f to your computer and use it in GitHub Desktop.
Save alanhuang122/85b9282d52e94a689e05a0c04a36676f to your computer and use it in GitHub Desktop.
#include <openssl/ssl.h>
#include <openssl/ossl_typ.h>
#include <stdio.h>
int main(){
SSL_CTX *ctx = NULL;
ctx = SSL_CTX_new(TLS_method());
SSL_CTX_set_min_proto_version(ctx, 0);
SSL_CTX_set_max_proto_version(ctx, 0);
printf("min ver: %d\n", SSL_CTX_get_min_proto_version(ctx));
printf("max ver: %d\n", SSL_CTX_get_max_proto_version(ctx));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment