+ static int ssl_lib_init = 0;
+
+ if (!ssl_lib_init) {
+ SSL_load_error_strings();
+ SSL_library_init();
+ OpenSSL_add_all_algorithms(); /* see Debian Bug#576430 and manpage */
+ ssl_lib_init = 1;
+ }
+
+ if (-2 == global_mydata_index) {
+ char tmp[] = "fetchmail SSL callback data";
+ global_mydata_index = SSL_get_ex_new_index(0, tmp, NULL, NULL, NULL);
+ if (-1 == global_mydata_index) return PS_UNDEFINED;
+ }