mirror of
https://github.com/gregtwallace/apc-p15-tool.git
synced 2025-07-05 15:56:32 +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
19
pkg/tools/asn1obj/oid.go
Normal file
19
pkg/tools/asn1obj/oid.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package asn1obj
|
||||
|
||||
import "encoding/asn1"
|
||||
|
||||
var (
|
||||
OIDPkscs15Content = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 15, 3, 1} // pkcs15content (PKCS #15 content type)
|
||||
OIDrsaEncryptionPKCS1 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 1} // rsaEncryption (PKCS #1)
|
||||
)
|
||||
|
||||
// ObjectIdentifier returns an ASN.1 OBJECT IDENTIFIER with the oidValue bytes
|
||||
func ObjectIdentifier(oid asn1.ObjectIdentifier) []byte {
|
||||
// should never error
|
||||
asn1result, err := asn1.Marshal(oid)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return asn1result
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue