I am doing a work on X.509 v3 certificates and want to know their exact structure. Is there an ASN.1 specification somewhere one could use? The rfc documents only seem to have parts of it specified...
X.509 v3 was defined in RFC 2459, with enhancements in RFC 3280 and RFC 5280.
Each of those RFCs has an ASN.1 section:
X.509 is really managed by the ITU, so https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-X.509-201210-S!!PDF-E&type=items is the most authoritative (see Annex A and Annex J for ASN.1 modules, chapters 7 and 8 for explanations). The newest version of the document requires payment, but the 2012 edition (linked) is free.