From 9016d309d9ad2be483fb1b1ab11549f462d4eb91 Mon Sep 17 00:00:00 2001 From: Julien Muchembled <jm@nexedi.com> Date: Wed, 16 Jan 2013 14:40:44 +0000 Subject: [PATCH] CertificateAuthorityTool: do not generate cert with empty common_name --- product/ERP5/Tool/CertificateAuthorityTool.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/product/ERP5/Tool/CertificateAuthorityTool.py b/product/ERP5/Tool/CertificateAuthorityTool.py index 2559d868a6..89c105b47c 100644 --- a/product/ERP5/Tool/CertificateAuthorityTool.py +++ b/product/ERP5/Tool/CertificateAuthorityTool.py @@ -191,6 +191,8 @@ class CertificateAuthorityTool(BaseTool): # No docstring in order to make this method non publishable # Returns certificate for passed common name, as dictionary of # {key, certificate, id, common_name} + if not common_name: + raise ValueError("Invalid common name: %r" % common_name) self._checkCertificateAuthority() self._lockCertificateAuthority() try: -- 2.30.9