本文整理匯總了Python中cryptography.x509.general_name.OtherName方法的典型用法代碼示例。如果您正苦於以下問題:Python general_name.OtherName方法的具體用法?Python general_name.OtherName怎麽用?Python general_name.OtherName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cryptography.x509.general_name
的用法示例。
在下文中一共展示了general_name.OtherName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_values_for_type
# 需要導入模塊: from cryptography.x509 import general_name [as 別名]
# 或者: from cryptography.x509.general_name import OtherName [as 別名]
def get_values_for_type(self, type):
# Return the value of each GeneralName, except for OtherName instances
# which we return directly because it has two important properties not
# just one value.
objs = (i for i in self if isinstance(i, type))
if type != OtherName:
objs = (i.value for i in objs)
return list(objs)