Questions tagged [asn.1]

ASN.1 stands for Abstract Syntax Notation One. It is a data specification language and a set of encoding rules for serializing the data.

ASN.1 stands for Abstract Syntax Notation One. It is part of the Presentation Layer of the OSI model.

ASN.1 specs covers two main roles:

  1. Specifies a notation to define data types and data values.
  2. Specifies different ways of encoding and decoding data values according to the syntax specifications.

Specifications

ASN.1 is an joint ISO/ITU-T standard. The documents covering the specs are:

771 questions
781
votes
12 answers

How to get .pem file from .key and .crt files?

How can I create a PEM file from an SSL certificate? These are the files that I have available: .crt server.csr server.key
Sergio Rodriguez
  • 8,258
  • 3
  • 18
  • 25
317
votes
2 answers

How to convert .crt to .pem

How can I convert .crt to .pem?
Ali
  • 10,774
  • 10
  • 56
  • 83
133
votes
6 answers

What are the key differences between Apache Thrift, Google Protocol Buffers, MessagePack, ASN.1 and Apache Avro?

All of these provide binary serialization, RPC frameworks and IDL. I'm interested in key differences between them and characteristics (performance, ease of use, programming languages support). If you know any other similar technologies, please…
andreypopp
  • 6,887
  • 5
  • 26
  • 26
88
votes
3 answers

Certificate subject X.509

According to the X.509, a certificate has an attribute subject. C=US, ST=Maryland, L=Pasadena, O=Brent Baccala, OU=FreeSoft, CN=www.freesoft.org/emailAddress=baccala@freesoft.org This is the typical subject value. The question is what are the…
Sergey
  • 11,548
  • 24
  • 76
  • 113
47
votes
4 answers

How does Google Protocol Buffers compare to ASN.1

What are the most noticable differences between Google Protocol Buffers and ASN.1 (with PER-encoding)? For my project the most imporant issue is the size of the serialized data. Has anyone done any data-size comparisons between the two?
Yrlec
  • 3,401
  • 6
  • 39
  • 75
41
votes
4 answers

What strings are allowed in the "common name" attribute in an X.509 certificate?

In the common name field of the DN of a X509 certificate, as defined in ASN.1 notation for OID "2.5.4.3", what are the allowed values? I know that the limit is up to 64 characters, but are all characters allowed? Digits? E.g. are .s allowed? Is an…
Cratylus
  • 52,998
  • 69
  • 209
  • 339
32
votes
5 answers

How to determine at run-time if app is for development, app store or ad hoc distribution?

Is there a way to determine programmatically if the currently running app was built and signed for development only or whether it was built for distribution? And can one determine if was build for app store or ad hoc distribution? Is it e.g.…
Codo
  • 75,595
  • 17
  • 168
  • 206
28
votes
4 answers

How does ASN.1 encode an object identifier?

I am having trouble understanding the basic concepts of ASN.1. If a type is an OID, does the corresponding number get actually encoded in the binary data? For instance in this definition: id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 } Does…
Cratylus
  • 52,998
  • 69
  • 209
  • 339
23
votes
5 answers

Parsing ASN.1 binary data with Java

I have binary ASN.1 data objects I need to parse into my Java project. I just want the ASN.1 structure and data as it is parsed for example by the BER viewer: The ASN.1 parser of BouncyCastle is not able to parse this structure (only returns…
Robert
  • 39,162
  • 17
  • 99
  • 152
18
votes
3 answers

Correctly create RSACryptoServiceProvider from public key

I'm currently trying to create an RSACryptoServiceProvider object solely from a decoded PEM file. After several days of searching, I did manage to wrangle a working solution but it's not one that would be production ready. In a nutshell, in order to…
DiskJunky
  • 4,750
  • 3
  • 37
  • 66
18
votes
4 answers

How do I decode a DER encoded string in Java?

I'm trying to read a custom extension from a digital certificate. I know the value is a GeneralString encoded in DER. Is there an easy way to correctly decode it and get a Java String? I tried the following, but 's' includes some of the encoding…
Ragesh
  • 2,800
  • 2
  • 25
  • 36
18
votes
7 answers

ASN1_TIME to time_t conversion

How can I convert ASN1_TIME to time_t format? I wanted to convert the return value of X509_get_notAfter() to seconds.
user1345697
  • 405
  • 2
  • 5
  • 15
17
votes
2 answers

How do I parse subjectAltName extension data using pyasn1?

I have some data that pyOpenSSL gave me, '0\r\x82\x0bexample.com'. This should be the value of a subjectAltName X509 extension. I tried to encode the necessary parts of the ASN1 specification for this extension using pyasn1 (and based on one of…
Jean-Paul Calderone
  • 47,755
  • 6
  • 94
  • 122
16
votes
1 answer

SNMP: ASN.1 MIB Definitions. Referencing a table within a table

Its's been a while since I've written ASN.1 so.. Our data model is comprised of several table definitions within a table. This is not workable in SNMP, so we need to flatten the definitions. The easiest way to do this would be to have the embedded…
Doug
  • 1,925
  • 3
  • 13
  • 9
16
votes
2 answers

SNMP MIB SMIv2 Conformance Group Issue

I have a MIB that I started working on but smilint complains about a missing conformance group. How do I add this conformance group to my file? BLEH-PRODUCT-MIB DEFINITIONS ::= BEGIN -- Objects in this MIB are implemented in the local SNMP agent. …
Eric des Courtis
  • 5,135
  • 6
  • 24
  • 37
1
2 3
51 52