Merge pull request #2914 from sirferl/master

Fixing kubernetes and verisign plugin
This commit is contained in:
Hossein Shafagh 2020-02-14 09:34:34 -08:00 committed by GitHub
commit bde3d1ac66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View File

@ -96,7 +96,7 @@ def build_secret(secret_format, secret_name, body, private_key, cert_chain):
if secret_format == "TLS": if secret_format == "TLS":
secret["type"] = "kubernetes.io/tls" secret["type"] = "kubernetes.io/tls"
secret["data"] = { secret["data"] = {
"tls.crt": base64encode(cert_chain), "tls.crt": base64encode(body),
"tls.key": base64encode(private_key), "tls.key": base64encode(private_key),
} }
if secret_format == "Certificate": if secret_format == "Certificate":

View File

@ -111,11 +111,6 @@ def process_options(options):
data["subject_alt_names"] = ",".join(get_additional_names(options)) data["subject_alt_names"] = ",".join(get_additional_names(options))
if options.get("validity_end") > arrow.utcnow().shift(years=2):
raise Exception(
"Verisign issued certificates cannot exceed two years in validity"
)
if options.get("validity_end"): if options.get("validity_end"):
# VeriSign (Symantec) only accepts strictly smaller than 2 year end date # VeriSign (Symantec) only accepts strictly smaller than 2 year end date
if options.get("validity_end") < arrow.utcnow().shift(years=2, days=-1): if options.get("validity_end") < arrow.utcnow().shift(years=2, days=-1):