mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-24 09:16:28 +08:00
update go api
This commit is contained in:
37
go/engine.go
37
go/engine.go
@@ -1,2 +1,39 @@
|
||||
/* +build cgo */
|
||||
package gmssl
|
||||
|
||||
/*
|
||||
#include <openssl/engine.h>
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
func GetEngineNames() []string {
|
||||
return []string{"skf", "sdf"}
|
||||
}
|
||||
|
||||
type Engine struct {
|
||||
engine *C.ENGINE
|
||||
}
|
||||
|
||||
func OpenEngine(name string, args map[string]string) (*Engine, error) {
|
||||
return nil, errors.New("Not implemented")
|
||||
}
|
||||
|
||||
func (eng *Engine) ExecuteCommand(cmd_name string, arg string, optinal bool) (string, error) {
|
||||
return "", errors.New("Not implemented")
|
||||
}
|
||||
|
||||
func (eng *Engine) LoadPrivateKey(key_id string, args map[string]string) (*PrivateKey, error) {
|
||||
return nil, errors.New("Not implemented")
|
||||
}
|
||||
|
||||
func (eng *Engine) LoadPublicKey(key_id string, args map[string]string) (*PublicKey, error) {
|
||||
return nil, errors.New("Not implemented")
|
||||
}
|
||||
|
||||
func (eng *Engine) LoadCertificate(ca_dn []string, args map[string]string) (string, error) {
|
||||
return "", errors.New("Not implemented")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user