Skip to content

Instantly share code, notes, and snippets.

@kdkanishka
kdkanishka / sign
Created January 13, 2021 08:10 — forked from koba-ninkigumi/sign
How to make, show and verify binary signature with openssl.
自己署名証明書の作成
# Make key.pem and cert.pem
openssl req -new -days 365 -x509 -nodes -keyout key.pem -out cert.pem
証明書の内容の表示
# Show cert.pem
openssl x509 -text -noout < cert.pem
署名ファイルの作成
# Make signature
@kdkanishka
kdkanishka / hello_as2.go
Last active March 24, 2019 10:11
AS2 (RFC 4130) in Golang
package main
import (
"bytes"
"crypto"
_ "crypto/md5" // for crypto.MD5
_ "crypto/sha1" // for crypto.SHA1
_ "crypto/sha512" // for crypto.SHA384 & 512
"crypto/x509"
"encoding/asn1"
@kdkanishka
kdkanishka / go_sftp.go
Created December 18, 2017 03:41 — forked from dzlab/go_sftp.go
an example of sftp in golang
package main
import (
"github.com/pkg/sftp"
"golang.org/x/crypto/ssh"
)
func main() {
addr := “my_ftp_server:22"
config := &ssh.ClientConfig{