Categories:
Android (13)
Apple Mac (27)
DH Keys (39)
DSA Keys (70)
EC Keys (971)
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 (3291)
Revoked Certificates (16)
Root CA (85)
RSA Keys (2635)
Tools (46)
Tutorial (1)
What Is (22)
Windows (127)
Collections:
Other Resources:
OpenSSL "ans1parse" - ASN.1 INTEGER Field Type
What is ASN.1 INTEGER field type? How to specify INTEGER field type in OpenSSL "asn1parse" command?
✍: FYIcenter.com
ASN.1 INTEGER field is a primitive field that can be used to store
signed integers of any size. To use ASN.1 INTEGER field in OpenSSL "asn1parse" command,
you need to remember the following rules:
Here are examples of using INTEGER with the OpenSSL "asn1parse" command:
C:\Users\fyicenter>\local\openssl\openssl.exe OpenSSL> asn1parse -genstr INTEGER:1 -out p1.der 0:d=0 hl=2 l= 1 prim: INTEGER :01 OpenSSL> asn1parse -genstr INTEGER:-1 -out n1.der 0:d=0 hl=2 l= 1 prim: INTEGER :-01 OpenSSL> asn1parse -genstr INTEGER:128 -out p128.der 0:d=0 hl=2 l= 2 prim: INTEGER :80 OpenSSL> asn1parse -genstr INTEGER:-128 -out n128.der 0:d=0 hl=2 l= 1 prim: INTEGER :-80 OpenSSL> asn1parse -genstr INTEGER:0x01 -out p1x.der 0:d=0 hl=2 l= 1 prim: INTEGER :01 OpenSSL> asn1parse -genstr INTEGER:-0x01 -out n1x.der 0:d=0 hl=2 l= 1 prim: INTEGER :-01 OpenSSL> exit C:\Users\fyicenter>bin2hex p1.der 020101 C:\Users\fyicenter>bin2hex n1.der 0201ff C:\Users\fyicenter>bin2hex p128.der 02020080 C:\Users\fyicenter>bin2hex n128.der 020180 C:\Users\fyicenter>bin2hex p1x.der 020101 C:\Users\fyicenter>bin2hex n1x.der 0201ff
Note that "bin2hex" is not a Windows command, You need to create your own tool to dump a binary file in hex format.
⇒ OpenSSL "ans1parse" - ASN.1 IA5STRING Field Type
⇐ OpenSSL "ans1parse -strparse" - Extract ASN.1 Sub Structure
2016-09-30, 7995👍, 0💬
Popular Posts:
Certificate Summary: Subject: DigiCert High Assurance CA-3 Issuer: DigiCert High Assurance EV Root C...
Certificate Summary: Subject: Symantec Class 3 Secure Server CA - G4 Issuer: VeriSign Class 3 Public...
How to export the server certificate to a file in Firefox? I can view the server certificate used by...
Certificate summary - Owner: *.xunlei.com, System engineering department, ShenZhen Thunder Networkin...
Certificate Summary: Subject: Thawte Personal Freemail CA Issuer: Thawte Personal Freemail CA Expira...