This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
自己署名証明書の作成 | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/pkg/sftp" | |
"golang.org/x/crypto/ssh" | |
) | |
func main() { | |
addr := “my_ftp_server:22" | |
config := &ssh.ClientConfig{ |