Exemplo n.º 1
0
func init() {
	C.OPENSSL_config(nil)
	C.ENGINE_load_builtin_engines()
	C.SSL_load_error_strings()
	C.SSL_library_init()
	C.OpenSSL_add_all_algorithms_not_a_macro()
	rc := C.Goopenssl_init_threadsafety()
	if rc != 0 {
		panic(fmt.Errorf("Goopenssl_init_locks failed with %d", rc))
	}
}
Exemplo n.º 2
0
// Initialize the OpenSSL library. Takes care of several bookkeeping functions
// like populating error messages and cipher lists.
func Init() int {
	C.SSL_library_init()
	C.ERR_load_BIO_strings()
	C.SSL_load_error_strings()
	return 0
}