def __get_asn1_algorithm_identifier(self, oid_str):
""" Generate ASN.1 structure for algorithm identifier
@developer: vsmysle
:param oid_str: string OID to encapsulate
:return: pyasn1.type.univ.Sequence object
"""
# TODO: add exceptions
# log entry
self.logger.debug("creating AlgorithmIdentifier ASN.1 "
"structure with OID=%s" % oid_str)
# create the instance of AlgorithmIdentifier
ai = asn1_dec.AlgorithmIdentifier()
# set corresponding parameters
ai['algorithm'] = oid_str
ai['parameters'] = univ.Null()
# return the result
return ai
评论列表
文章目录