- } tls_method_sym, ssl_ctx_new_sym, ssl_ctx_free_sym, err_get_error_sym,
- openssl_version_num_sym;
- enum test_types_en test_type;
- int i;
-
- if (argc != 4) {
- printf("Unexpected number of arguments\n");
- return 1;
+ } symbols[5];
+ TLS_method_t myTLS_method;
+ SSL_CTX_new_t mySSL_CTX_new;
+ SSL_CTX_free_t mySSL_CTX_free;
+ ERR_get_error_t myERR_get_error;
+ OPENSSL_version_major_t myOPENSSL_version_major;
+ OPENSSL_version_minor_t myOPENSSL_version_minor;
+ OPENSSL_version_patch_t myOPENSSL_version_patch;
+ OPENSSL_atexit_t myOPENSSL_atexit;
+ int result = 0;
+
+ switch (test_type) {
+ case JUST_CRYPTO:
+ case DSO_REFTEST:
+ case NO_ATEXIT:
+ case CRYPTO_FIRST:
+ if (!shlib_load(path_crypto, &cryptolib)) {
+ fprintf(stderr, "Failed to load libcrypto\n");
+ goto end;
+ }
+ if (test_type != CRYPTO_FIRST)
+ break;
+ /* Fall through */
+
+ case SSL_FIRST:
+ if (!shlib_load(path_ssl, &ssllib)) {
+ fprintf(stderr, "Failed to load libssl\n");
+ goto end;
+ }
+ if (test_type != SSL_FIRST)
+ break;
+ if (!shlib_load(path_crypto, &cryptolib)) {
+ fprintf(stderr, "Failed to load libcrypto\n");
+ goto end;
+ }
+ break;