mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-09-23 22:03:48 +08:00
update go-api
GetDigestNames() and GetCipherNames get supported algorithms with callbacks.
This commit is contained in:
@@ -19,14 +19,14 @@ import (
|
||||
func GetErrors() error {
|
||||
bio := C.BIO_new(C.BIO_s_mem())
|
||||
if bio == nil {
|
||||
return errors.New("GetErrors function failure")
|
||||
return errors.New("GetErrors function failure 1")
|
||||
}
|
||||
defer C.BIO_free(bio)
|
||||
C.ERR_print_errors(bio)
|
||||
var p *C.char
|
||||
len := C.bio_get_mem_data(bio, &p)
|
||||
if len <= 0 {
|
||||
return errors.New("GetErrors function failure")
|
||||
return errors.New("GetErrors function failure 2")
|
||||
}
|
||||
return errors.New(C.GoString(p))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user