mirror of
https://github.com/gregtwallace/apc-p15-tool.git
synced 2025-09-22 23:37:04 +00:00
app: restructure and start building p15 output
This commit is contained in:
parent
6610c92058
commit
e2e4f2037c
24 changed files with 622 additions and 168 deletions
pkg/tools/asn1obj
16
pkg/tools/asn1obj/utf8string.go
Normal file
16
pkg/tools/asn1obj/utf8string.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package asn1obj
|
||||
|
||||
import (
|
||||
"encoding/asn1"
|
||||
)
|
||||
|
||||
// UTF8String returns the specified string as a UTF8String
|
||||
func UTF8String(s string) []byte {
|
||||
// should never error
|
||||
asn1result, err := asn1.MarshalWithParams(s, "utf8")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return asn1result
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue