Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Jul 8, 2024
1 parent defed4e commit ed5f104
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkcs12/p12_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,8 @@ var LegacyOpts = LegacyDESOpts
// ModernOpts
var ModernOpts = Modern2023Opts

// Shangmi2024Opts
var Shangmi2024Opts = LegacyGmsmOpts

// Default Opts
var DefaultOpts = LegacyRC2Opts
6 changes: 5 additions & 1 deletion pkcs12/pkcs12_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,14 @@ var testOpt = Opts{

func Test_Encode(t *testing.T) {
test_Encode(t, testOpt, "password-testkjjj", "testOpt")

test_Encode(t, LegacyRC2Opts, "password-testkjjj", "LegacyRC2Opts")
test_Encode(t, LegacyDESOpts, "password-testkjjj", "LegacyDESOpts")
test_Encode(t, PasswordlessOpts, "", "PasswordlessOpts")
test_Encode(t, Modern2023Opts, "passwordpasswordpasswordpassword", "Modern2023Opts")

test_Encode(t, LegacyGostOpts, "passwordpasswordpasswordpassword", "LegacyGostOpts")
test_Encode(t, LegacyGmsmOpts, "passwordpasswordpasswordpassword", "LegacyGmsmOpts")
test_Encode(t, Shangmi2024Opts, "passwordpasswordpasswordpassword", "Shangmi2024Opts")
test_Encode(t, LegacyPBMAC1Opts, "1234", "LegacyPBMAC1Opts")

var LegacyPBMAC1Opts2 = Opts{
Expand Down

0 comments on commit ed5f104

Please sign in to comment.