title: How does ASN.1 encode an object identifier?
body: <p>I am having trouble understanding the basic concepts of ASN.1.</p>
  
  <p>If a type is an OID, does the corresponding number get actually encoded in the binary data?</p>
  
  <p>For instance in this definition:</p>
  
  <pre><code>id-ad-ocsp         OBJECT IDENTIFIER ::= { id-ad 1 }
  </code></pre>
  
  <p>Does the corresponding 1.3.6.1.5.5.7.48.1 get encoded in the binary exactly like this?</p>
  
  <p>I am asking this because I am trying to understand a specific value I see in a DER file (a certificate), which is 04020500, and I am not sure how to interpret it.</p>