Merge "Completed localization tagging for plugin directory"
This commit is contained in:
commit
b34bbe7cbd
@ -346,7 +346,8 @@ class PKCS11(object):
|
|||||||
def perform_rng_self_test(self, session):
|
def perform_rng_self_test(self, session):
|
||||||
test_random = self.generate_random(100, session)
|
test_random = self.generate_random(100, session)
|
||||||
if self.ffi.buffer(test_random, 100)[:] == b"\x00" * 100:
|
if self.ffi.buffer(test_random, 100)[:] == b"\x00" * 100:
|
||||||
raise P11CryptoPluginException("Apparent RNG self-test failure.")
|
raise P11CryptoPluginException(u._(
|
||||||
|
"Apparent RNG self-test failure."))
|
||||||
|
|
||||||
def open_session(self, slot):
|
def open_session(self, slot):
|
||||||
session_ptr = self.ffi.new("CK_SESSION_HANDLE *")
|
session_ptr = self.ffi.new("CK_SESSION_HANDLE *")
|
||||||
@ -409,7 +410,7 @@ class PKCS11(object):
|
|||||||
val_list.append(self.ffi.new("char []", attr.value))
|
val_list.append(self.ffi.new("char []", attr.value))
|
||||||
attributes[index].value_len = len(attr.value)
|
attributes[index].value_len = len(attr.value)
|
||||||
else:
|
else:
|
||||||
raise TypeError("Unknown attribute type provided.")
|
raise TypeError(u._("Unknown attribute type provided."))
|
||||||
|
|
||||||
attributes[index].value = val_list[-1]
|
attributes[index].value = val_list[-1]
|
||||||
|
|
||||||
|
@ -780,8 +780,8 @@ class DogtagCAPlugin(cm.CertificatePluginBase):
|
|||||||
}
|
}
|
||||||
|
|
||||||
if request_type not in jump_table:
|
if request_type not in jump_table:
|
||||||
raise DogtagPluginNotSupportedException(
|
raise DogtagPluginNotSupportedException(u._(
|
||||||
"Dogtag plugin does not support %s request type".format(
|
"Dogtag plugin does not support %s request type").format(
|
||||||
request_type))
|
request_type))
|
||||||
|
|
||||||
return jump_table[request_type](order_id, order_meta, plugin_meta,
|
return jump_table[request_type](order_id, order_meta, plugin_meta,
|
||||||
@ -825,8 +825,8 @@ class DogtagCAPlugin(cm.CertificatePluginBase):
|
|||||||
:param barbican_meta_dto:
|
:param barbican_meta_dto:
|
||||||
:return: cm.ResultDTO
|
:return: cm.ResultDTO
|
||||||
"""
|
"""
|
||||||
raise DogtagPluginNotSupportedException(
|
raise DogtagPluginNotSupportedException(u._(
|
||||||
"Dogtag plugin does not support %s request type".format(
|
"Dogtag plugin does not support %s request type").format(
|
||||||
cm.CertificateRequestType.FULL_CMC_REQUEST))
|
cm.CertificateRequestType.FULL_CMC_REQUEST))
|
||||||
|
|
||||||
@_catch_enrollment_exceptions
|
@_catch_enrollment_exceptions
|
||||||
|
@ -256,7 +256,7 @@ class KMIPSecretStore(ss.SecretStoreBase):
|
|||||||
template_attribute=template_attribute,
|
template_attribute=template_attribute,
|
||||||
credential=self.credential)
|
credential=self.credential)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception("Error opening or writing to client")
|
LOG.exception(u._LE("Error opening or writing to client"))
|
||||||
raise ss.SecretGeneralException(str(e))
|
raise ss.SecretGeneralException(str(e))
|
||||||
else:
|
else:
|
||||||
if result.result_status.enum == enums.ResultStatus.SUCCESS:
|
if result.result_status.enum == enums.ResultStatus.SUCCESS:
|
||||||
@ -315,7 +315,7 @@ class KMIPSecretStore(ss.SecretStoreBase):
|
|||||||
common_template_attribute=common,
|
common_template_attribute=common,
|
||||||
credential=self.credential)
|
credential=self.credential)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception("Error opening or writing to client")
|
LOG.exception(u._LE("Error opening or writing to client"))
|
||||||
raise ss.SecretGeneralException(str(e))
|
raise ss.SecretGeneralException(str(e))
|
||||||
else:
|
else:
|
||||||
if result.result_status.enum == enums.ResultStatus.SUCCESS:
|
if result.result_status.enum == enums.ResultStatus.SUCCESS:
|
||||||
@ -728,7 +728,7 @@ class KMIPSecretStore(ss.SecretStoreBase):
|
|||||||
reason=result.result_reason,
|
reason=result.result_reason,
|
||||||
message=result.result_message
|
message=result.result_message
|
||||||
)
|
)
|
||||||
LOG.debug("ERROR from KMIP server: %s", msg)
|
LOG.error(u._LE("ERROR from KMIP server: %s"), msg)
|
||||||
raise ss.SecretGeneralException(msg)
|
raise ss.SecretGeneralException(msg)
|
||||||
|
|
||||||
def _validate_keyfile_permissions(self, path):
|
def _validate_keyfile_permissions(self, path):
|
||||||
|
@ -207,7 +207,7 @@ class SnakeoilCACertificatePlugin(cert_manager.CertificatePluginBase):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
return cert_manager.ResultDTO(
|
return cert_manager.ResultDTO(
|
||||||
cert_manager.CertificateStatus.CLIENT_DATA_ISSUE_SEEN,
|
cert_manager.CertificateStatus.CLIENT_DATA_ISSUE_SEEN,
|
||||||
status_message="No request_data specified")
|
status_message=u._("No request_data specified"))
|
||||||
csr = crypto.load_certificate_request(crypto.FILETYPE_PEM, encoded_csr)
|
csr = crypto.load_certificate_request(crypto.FILETYPE_PEM, encoded_csr)
|
||||||
cert = self.cert_manager.make_certificate(csr)
|
cert = self.cert_manager.make_certificate(csr)
|
||||||
cert_enc = crypto.dump_certificate(crypto.FILETYPE_PEM, cert)
|
cert_enc = crypto.dump_certificate(crypto.FILETYPE_PEM, cert)
|
||||||
|
Loading…
Reference in New Issue
Block a user