Golang and x509 with GOST

396 views
Skip to first unread message

vladis...@gmail.com

unread,
Jul 9, 2014, 7:39:30 AM7/9/14
to golan...@googlegroups.com
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.

agl

unread,
Jul 9, 2014, 2:26:55 PM7/9/14
to golan...@googlegroups.com
On Wednesday, July 9, 2014 4:39:30 AM UTC-7, Vladislav Egorov wrote:
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.

There is not, and there is no plan for, any GOST support I'm afraid.


Cheers

AGL 

014...@gmail.com

unread,
Apr 25, 2017, 8:43:11 AM4/25/17
to golang-nuts


среда, 9 июля 2014 г., 21:26:55 UTC+3 пользователь agl написал:

 It is fairly easy to implement in the С library, and then call. I do not know what is required, to pkcs7sign files + gost I implemented
in go
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)




014...@gmail.com

unread,
Apr 25, 2017, 8:58:07 AM4/25/17
to golang-nuts

I'm sorry that I got confused in the interface when formatting.
Library file in Attachment. Example usage above. And you need to install support for algorithms GOST to OpenSSL.
pkcs7sing.zip
Reply all
Reply to author
Forward
0 new messages