Categories:
Android (13)
Apple Mac (27)
DH Keys (39)
DSA Keys (83)
EC Keys (2461)
Firefox (30)
General (10)
Google Chrome (25)
Intermediate CA (152)
Java VM (29)
JDK Keytool (28)
Microsoft CertUtil (29)
Microsoft Edge (9)
Mozilla CertUtil (21)
OpenSSL (236)
Other (7)
Portecle (38)
Publishers (6619)
Revoked Certificates (16)
Root CA (85)
RSA Keys (5332)
Tools (46)
Tutorial (1)
What Is (22)
Windows (127)
Collections:
Other Resources:
OpenSSL "ans1parse" - Wrap of Primitive Field
Can I wrap a primitive field into a BIT STRING or OCTET STRING field with the OpenSSL "asn1parse" command?
✍: FYIcenter.com
Yes, you can wrap any ASN.1 primitive field into a BIT STRING or OCTET STRING field using the BITWRAP or OCTWRAP modifiers using the OpenSSL "asn1parse" command.
The test below gives some demonstrations of wrapping primitive field into BIT STRING or OCTET STRING:
C:\Users\fyicenter>\local\openssl\openssl asn1parse -genstr BITWRAP,INTEGER:127 -dump 0:d=0 hl=2 l= 4 prim: BIT STRING 0000 - 00 02 01 7f .... C:\Users\fyicenter>\local\openssl\openssl asn1parse -genstr OCTWRAP,INTEGER:127 0:d=0 hl=2 l= 3 prim: OCTET STRING [HEX DUMP]:02017F C:\Users\fyicenter>\local\openssl\openssl asn1parse -genstr OCTWRAP,INTEGER:128 0:d=0 hl=2 l= 4 prim: OCTET STRING [HEX DUMP]:02020080 C:\Users\fyicenter>\local\openssl\openssl asn1parse -genstr OCTWRAP,INTEGER:-0x01 0:d=0 hl=2 l= 3 prim: OCTET STRING [HEX DUMP]:0201FF C:\Users\fyicenter>\local\openssl\openssl asn1parse -genstr OCTWRAP,IA5STRING:"1234" 0:d=0 hl=2 l= 6 prim: OCTET STRING [HEX DUMP]:160431323334 C:\Users\fyicenter>\local\openssl\openssl asn1parse -genstr OCTWRAP,OBJECT:2.5.4.3 0:d=0 hl=2 l= 5 prim: OCTET STRING [HEX DUMP]:0603550403 C:\Users\fyicenter>\local\openssl\openssl asn1parse -genstr OCTWRAP,BITSTRING:"1234" 0:d=0 hl=2 l= 7 prim: OCTET STRING [HEX DUMP]:03050031323334 C:\Users\fyicenter>\local\openssl\openssl asn1parse -genstr OCTWRAP,FORMAT:HEX,BITSTRING:41424344 0:d=0 hl=2 l= 7 prim: OCTET STRING [HEX DUMP]:03050041424344 C:\Users\fyicenter>\local\openssl\openssl asn1parse -genstr OCTWRAP,FORMAT:HEX,OCTETSTRING:41424244 0:d=0 hl=2 l= 6 prim: OCTET STRING [HEX DUMP]:040441424244
⇒ OpenSSL "ans1parse" - DER (Distinguished Encoding Rules)
2016-09-28, 5850🔥, 0💬
Popular Posts:
It is not always possible for users to enroll for a certificate on their own behalf. This can be the...
What is the PKCS#1 v1.5 padding schema used in OpenSSL "rsautl" command? PKCS#1 v1.5 padding schema ...
Certificate summary - Owner: a248.e.akamai.net, "Akamai Technologies, Inc.", US Issuer: GTE CyberTru...
Certificate summary - Owner: ssl.cdngc.net, CDNetworks Inc., L=San Jose, ST=California, US Issuer: D...
Renewing a certificate with the same key provides maximum compatibility with past uses of the accomp...