Adding a better error message for really long common names Fixes #38
This commit is contained in:
parent
a7fd74396c
commit
df9b345541
|
@ -7,6 +7,7 @@
|
||||||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
import re
|
||||||
import ssl
|
import ssl
|
||||||
import base64
|
import base64
|
||||||
from json import dumps
|
from json import dumps
|
||||||
|
@ -297,7 +298,7 @@ class CloudCAIssuerPlugin(IssuerPlugin, CloudCA):
|
||||||
'ownerEmail': options['owner'],
|
'ownerEmail': options['owner'],
|
||||||
'caName': options['authority'].name,
|
'caName': options['authority'].name,
|
||||||
'csr': csr,
|
'csr': csr,
|
||||||
'comment': options['description']
|
'comment': re.sub(r'^[\w\-\s]+$', '', options['description'])
|
||||||
}
|
}
|
||||||
|
|
||||||
response = self.post(endpoint, remove_none(cloudca_options))
|
response = self.post(endpoint, remove_none(cloudca_options))
|
||||||
|
|
Loading…
Reference in New Issue