You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
477 B
Go
26 lines
477 B
Go
8 months ago
|
package keygen
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestKeyGen_Gen(t *testing.T) {
|
||
|
var k = KeyGen{
|
||
|
Type: "rsa",
|
||
|
Encrypt: "",
|
||
|
Bits: 2048,
|
||
|
Outfolder: ".",
|
||
|
Prefix: "mykey",
|
||
|
Force: true,
|
||
|
Country: "CN",
|
||
|
Locality: "Beijing",
|
||
|
Organization: "B612",
|
||
|
OrganizationalUnit: "B612",
|
||
|
CommonName: "Little Prince",
|
||
|
}
|
||
|
err := k.Gen()
|
||
|
if err != nil {
|
||
|
t.Error(err)
|
||
|
}
|
||
|
}
|