Someone tell me how to work in a Golang with X509 certificates and cryptography Russian GOST (CryptoPro CSP), which can have a library, or who have worked?Grateful for any help in advance.
package main
// #cgo CFLAGS: -I ./
// #cgo LDFLAGS: -L ./ -lpkcs7sign -lssl -lcrypto
// #include <pkcs7sign.h>
import "C"
.....
fcert, err := ioutil.ReadFile(path)
if err != nil{
fmt.Printf("Error: error open cert file");
<------>os.Exit(-1)
}
scert := string(fcert)
ccert := C.CString(string(scert))
sbuff := C.CString(buff)
sbuffout := C.CString(sbout)
i := C.pkcs7sign(ccert, sbuff, sbuffout)