title: OpenSSL linking: missing extern Symbol BIGNUM_it
body: <p>I want to use some features of OpenSSL(1.0.1j) on multiple devices. One requirement is to minimize the size of the code. The OpenSSL code is linked statically to mine. I am only using the RSA_public_decrypt, BIO and PEM->RSA decoding methods. To achieve this, i'm currently compiling OpenSSL not the standard autotools way. I have already stripped out some code that i never use. The only symbol i can not resolve is _BIGNUM_it.</p>
  
  <p>It is declared in <code>asn1t.h</code> with:</p>
  
  <pre><code>DECLARE_ASN1_ITEM(BIGNUM)
  </code></pre>
  
  <p>and </p>
  
  <pre><code>#define DECLARE_ASN1_ITEM(name) \
   extern const ASN1_ITEM name##_it;
  </code></pre>
  
  <p>It is used in <code>rsa_asn1.c</code>:</p>
  
  <pre><code>ASN1_SIMPLE(RSA, n, BIGNUM),
  ASN1_SIMPLE(RSA, e, BIGNUM),
  </code></pre>
  
  <p>which resolves to:</p>
  
  <pre><code>#define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>#define ASN1_EX_TYPE(flags, tag, stname, field, type) { \
      (flags), (tag), offsetof(stname, field),\
      #field, ASN1_ITEM_ref(type) }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>#define ASN1_ITEM_ref(iptr) (&amp;(iptr##_it))
  </code></pre>
  
  <p>I searched for other symbols used that way. They were implemented using <code>IMPLEMENT_ASN1_TYPE()</code>. I searched all OpenSSL Code for something like that using BIGNUM and didn't find anything. Also I tried to use IMPLEMENT_ASN1_TYPE(BIGNUM) in the code, which resulted in thousands of errors.</p>
  
  <p>Is this something provided from the outside? Do i miss a .c file? If yes, which?</p>
  
  <p>Thanks for your help!</p>