;ō ŠĀŅ>c@s>dZdkZdkZdklZd„Zdd„ZdS(s° asn1helper.py - some utilities to make life easier with asn1.py (c) by Michael Stroeder This module is distributed under the terms of the GPL (GNU GENERAL PUBLIC LICENSE) Version 2 (see http://www.gnu.org/copyleft/gpl.html) This module requires at least sub-module asn1.py of package Pisces found on http://www.cnri.reston.va.us/software/pisces/ $Id: asn1helper.py,v 1.3 2003/05/26 07:21:46 michael Exp $ N(sasn1cCsĻtii|dƒoaydkl}Wn tj odkl}nXt|ddƒ}||ƒ}|i ƒn)t|dƒ}t i |ƒ}|i ƒ|SdS(s] Read descriptions of OIDs either from Peter Gutmann's dumpasn1.cfg or a pickled copy. s.pickle(sloadsrbsrN(sosspathsisfiles dumpasn1cfgscPicklesloads ImportErrorspicklesopensfsoidssclosesasn1sparseCfg(s dumpasn1cfgsloadsfsoids((s./pylib/mspki/asn1helper.pysParseCfgs  icCsh|tjo |i|ƒo=||d}| oti|ddƒ\}}n|Sn t |ƒSdS(sH returns description of oid if present in oids or stringed oid else s Descriptions iN( soidssNoneshas_keysoidsdescrs includeoidsstringssplitsrestsstr(soidsoidss includeoidsdescrsrest((s./pylib/mspki/asn1helper.pysGetOIDDescription(s(s__doc__sossstringspiscessasn1sParseCfgsGetOIDDescription(sParseCfgsGetOIDDescriptionsossstringsasn1((s./pylib/mspki/asn1helper.pys? s