Ejemplo n.º 1
0
 def _get_extension(self, short_name):
     for extension in self.csr.get_extensions():
         if extension.get_short_name() == short_name:
             result = [
                 crypto_utils.pyopenssl_normalize_name(usage.strip()) for usage in to_text(extension, errors='surrogate_or_strict').split(',')
             ]
             return sorted(result), bool(extension.get_critical())
     return None, False
Ejemplo n.º 2
0
 def __get_name(self, name):
     result = []
     for sub in name.get_components():
         result.append([
             crypto_utils.pyopenssl_normalize_name(sub[0]),
             to_text(sub[1])
         ])
     return result
 def _get_extension(self, short_name):
     for extension_idx in range(0, self.cert.get_extension_count()):
         extension = self.cert.get_extension(extension_idx)
         if extension.get_short_name() == short_name:
             result = [
                 crypto_utils.pyopenssl_normalize_name(usage.strip()) for usage in to_text(extension, errors='surrogate_or_strict').split(',')
             ]
             return sorted(result), bool(extension.get_critical())
     return None, False