OpenVMS Source Code Demos
mysql_shrlib_wrapper
//============================================================================
// title : MYSQL_SHRLIB_WRAPPER.C
// created: 2018-04-16
// purpose: a wrapper to get around a linker problem with the MariaDB C API
// on OpenVMS-8.4 whenever I want to link to shared SSL libraries
// compile: cc MYSQL_SHRLIB_WRAPPER.C/names=as_is
//============================================================================
//
// chunk #1
//
// 1) the following list of symbols came from a failed linker listing
// where I was trying to link against these shared libraries:
// sys$library:SSL1$LIBCRYPTO_SHR32.EXE/share
// sys$library:SSL1$LIBSSL_SHR32.EXE/shae
// 2) I sorted the list (nodups) then upcased everything
// 3) next, I tacked on soft brackets and a semicolon
//============================================================================
//
// these become forward declarations
//
void ASN1_STRING_DATA();
void ASN1_STRING_LENGTH();
void BN_BIN2BN();
void CRYPTO_CLEANUP_ALL_EX_DATA();
void DH_FREE();
void DH_NEW();
void ERR_ERROR_STRING_N();
void ERR_FREE_STRINGS();
void ERR_GET_ERROR();
void ERR_GET_ERROR_LINE_DATA();
void ERR_REMOVE_STATE();
void EVP_CLEANUP();
void OPENSSL_ADD_ALL_ALGO_NOCONF();
void SSL_CIPHER_GET_NAME();
void SSL_CTX_CHECK_PRIVATE_KEY();
void SSL_CTX_CTRL();
void SSL_CTX_FREE();
void SSL_CTX_LOAD_VERIFY_LOCATIONS();
void SSL_CTX_NEW();
void SSL_CTX_SET_CIPHER_LIST();
void SSL_CTX_SET_DEF_VERIFY_PATHS();
void SSL_CTX_SET_SESSION_ID_CONTEXT();
void SSL_CTX_SET_VERIFY();
void SSL_CTX_USE_PRIVATEKEY_FILE();
void SSL_CTX_USE_CERT_CHAIN_FILE();
void SSL_SESSION_SET_TIMEOUT();
void SSL_ACCEPT();
void SSL_CLEAR();
void SSL_CONNECT();
void SSL_CTRL();
void SSL_FREE();
void SSL_GET_CURRENT_CIPHER();
void SSL_GET_ERROR();
void SSL_GET_FD();
void SSL_GET_PEER_CERTIFICATE();
void SSL_GET_SESSION();
void SSL_GET_VERIFY_RESULT();
void SSL_LIBRARY_INIT();
void SSL_LOAD_ERROR_STRINGS();
void SSL_NEW();
void SSL_PENDING();
void SSL_READ();
void SSL_SET_FD();
void SSL_SET_QUIET_SHUTDOWN();
void SSL_SHUTDOWN();
void SSL_WRITE();
void SSLV23_CLIENT_METHOD();
void SSLV23_SERVER_METHOD();
void X509_NAME_ENTRY_GET_DATA();
void X509_NAME_GET_ENTRY();
void X509_NAME_GET_INDEX_BY_NID();
void X509_FREE();
void X509_GET_SUBJECT_NAME();
//
// 1) the following list of symbols came from a failed linker listing
// 2) here we will xlate between what Mark's case-sensitive libraries what
// and what we've got
//
ASN1_STRING_data(){
ASN1_STRING_DATA();
}
ASN1_STRING_length(){
ASN1_STRING_LENGTH();
}
BN_bin2bn(){
BN_BIN2BN();
}
CRYPTO_cleanup_all_ex_data(){
CRYPTO_CLEANUP_ALL_EX_DATA();
}
DH_free(){
DH_FREE();
}
DH_new(){
DH_NEW();
}
ERR_error_string_n(){
ERR_ERROR_STRING_N();
}
ERR_free_strings(){
ERR_FREE_STRINGS();
}
ERR_get_error(){
ERR_GET_ERROR();
}
ERR_get_error_line_data(){
ERR_GET_ERROR_LINE_DATA();
}
ERR_remove_state(){
ERR_REMOVE_STATE();
}
EVP_cleanup(){
EVP_CLEANUP();
}
OPENSSL_add_all_algo_noconf(){
OPENSSL_ADD_ALL_ALGO_NOCONF();
}
SSL_CIPHER_get_name(){
SSL_CIPHER_GET_NAME();
}
SSL_CTX_check_private_key(){
SSL_CTX_CHECK_PRIVATE_KEY();
}
SSL_CTX_ctrl(){
SSL_CTX_CTRL();
}
SSL_CTX_free(){
SSL_CTX_FREE();
}
SSL_CTX_load_verify_locations(){
SSL_CTX_LOAD_VERIFY_LOCATIONS();
}
SSL_CTX_new(){
SSL_CTX_NEW();
}
SSL_CTX_set_cipher_list(){
SSL_CTX_SET_CIPHER_LIST();
}
SSL_CTX_set_def_verify_paths(){
SSL_CTX_SET_DEF_VERIFY_PATHS();
}
SSL_CTX_set_session_id_context(){
SSL_CTX_SET_SESSION_ID_CONTEXT();
}
SSL_CTX_set_verify(){
SSL_CTX_SET_VERIFY();
}
SSL_CTX_use_PrivateKey_file(){
SSL_CTX_USE_PRIVATEKEY_FILE();
}
SSL_CTX_use_cert_chain_file(){
SSL_CTX_USE_CERT_CHAIN_FILE();
}
SSL_SESSION_set_timeout(){
SSL_SESSION_SET_TIMEOUT();
}
SSL_accept(){
SSL_ACCEPT();
}
SSL_clear(){
SSL_CLEAR();
}
SSL_connect(){
SSL_CONNECT();
}
SSL_ctrl(){
SSL_CTRL();
}
SSL_free(){
SSL_FREE();
}
SSL_get_current_cipher(){
SSL_GET_CURRENT_CIPHER();
}
SSL_get_error(){
SSL_GET_ERROR();
}
SSL_get_fd(){
SSL_GET_FD();
}
SSL_get_peer_certificate(){
SSL_GET_PEER_CERTIFICATE();
}
SSL_get_session(){
SSL_GET_SESSION();
}
SSL_get_verify_result(){
SSL_GET_VERIFY_RESULT();
}
SSL_library_init(){
SSL_LIBRARY_INIT();
}
SSL_load_error_strings(){
SSL_LOAD_ERROR_STRINGS();
}
SSL_new(){
SSL_NEW();
}
SSL_pending(){
SSL_PENDING();
}
SSL_read(){
SSL_READ();
}
SSL_set_fd(){
SSL_SET_FD();
}
SSL_set_quiet_shutdown(){
SSL_SET_QUIET_SHUTDOWN();
}
SSL_shutdown(){
SSL_SHUTDOWN();
}
SSL_write(){
SSL_WRITE();
}
SSLv23_client_method(){
SSLV23_CLIENT_METHOD();
}
SSLv23_server_method(){
SSLV23_SERVER_METHOD();
}
X509_NAME_ENTRY_get_data(){
X509_NAME_ENTRY_GET_DATA();
}
X509_NAME_get_entry(){
X509_NAME_GET_ENTRY();
}
X509_NAME_get_index_by_NID(){
X509_NAME_GET_INDEX_BY_NID();
}
X509_free(){
X509_FREE();
}
X509_get_subject_name(){
X509_GET_SUBJECT_NAME();
}
//============================================================================
Back to
Home
Neil Rieck
Waterloo, Ontario, Canada.