We are often asked "where can I find the ASN.1 specification for some given standard?". Many standard documents have ASN.1 specifications embedded, but it can be a time consuming task to extract the specifications into a text file. It becomes even more time consuming if the specification imports data from other specifications embedded within other standards.
There are a few place where ASN.1 specifications are maintained in pure ASN.1 form. Perhaps the best is the ITU-T Module Database. This resource contains syntax checked ASN.1 specifications that are ready for use with a standard ASN.1 compiler. It is possible to click on a recommendation link to get to an option labeled "Click here to download all the modules needed to compile this Recommendation (zipped archive)". This provides the full set of ASN.1 modules needed for the recommendation.
Another site where ASN.1 specifications can be found is wireshark.org. By going under the Develop -> Browse the Code menu item, a link to view the online SVN repository is available. Under the trunk/asn1 directory in this repository, ASN.1 specifications for a number of well-known standards can be found. The user should be forewarned, however, that these are not often syntactically correct and will fail compilation with a standard ASN.1 compiler. We have attempted to fix these syntax errors in some cases and contribute updated specs only to be rebuffed with the argument that they work for the intended purpose which is for Wireshark dissectors.
Finally, there are standards documents themselves. As previously mentioned, the ASN.1 modules are usually embedded so there is a fair amount of work involved in extracting them. For one case, IETF RFC's, we have developed a Perl script for extracting the text. It may be downloaded/viewed at http://www.obj-sys.com/perlscripts/rfcExtractAsn1.txt. Simply download or copy the text to a file name rfcExtractAsn1.pl and run it using Perl. The lone argument it takes is the URL to the IETF RFC from which ASN.1 module(s) are to be extracted.
There may be other sources of ASN.1 as well, but these are the ones we are aware of. If anyone knows of any place else, please comment. We would be interested to know.