From 97165b8711c3eb6849b97a9bb20bc1eb075a0a97 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Wed, 11 Mar 2015 07:51:06 +0000 Subject: [PATCH] EULA using pkg_resources (fixes #278) --- EULA | 6 +----- MANIFEST.in | 1 + letsencrypt/EULA | 5 +++++ letsencrypt/scripts/main.py | 9 +++++---- 4 files changed, 12 insertions(+), 9 deletions(-) mode change 100644 => 120000 EULA create mode 100644 letsencrypt/EULA diff --git a/EULA b/EULA deleted file mode 100644 index dd7759361..000000000 --- a/EULA +++ /dev/null @@ -1,5 +0,0 @@ -This is a PREVIEW RELEASE of a client application for the Let's Encrypt certificate authority and other services using the ACME protocol. The Let's Encrypt certificate authority is NOT YET ISSUING CERTIFICATES TO THE PUBLIC. - -Until publicly-trusted certificates can be issued by Let's Encrypt, this software CANNOT OBTAIN A PUBLICLY-TRUSTED CERTIFICATE FOR YOUR WEB SERVER. You should only use this program if you are a developer interested in experimenting with the ACME protocol or in helping to improve this software. If you want to configure your web site with HTTPS in the meantime, please obtain a certificate from a different authority. - -For updates on the status of Let's Encrypt, please visit the Let's Encrypt home page at https://letsencrypt.org/. diff --git a/EULA b/EULA new file mode 120000 index 000000000..4a6da286e --- /dev/null +++ b/EULA @@ -0,0 +1 @@ +letsencrypt/EULA \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index 9bbbde83a..bea6fd9bb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,6 +2,7 @@ include README.rst include CHANGES.rst include CONTRIBUTING.rst include linter_plugin.py +include letsencrypt/EULA recursive-include letsencrypt *.json recursive-include letsencrypt *.conf recursive-include letsencrypt/client/tests/testdata * diff --git a/letsencrypt/EULA b/letsencrypt/EULA new file mode 100644 index 000000000..dd7759361 --- /dev/null +++ b/letsencrypt/EULA @@ -0,0 +1,5 @@ +This is a PREVIEW RELEASE of a client application for the Let's Encrypt certificate authority and other services using the ACME protocol. The Let's Encrypt certificate authority is NOT YET ISSUING CERTIFICATES TO THE PUBLIC. + +Until publicly-trusted certificates can be issued by Let's Encrypt, this software CANNOT OBTAIN A PUBLICLY-TRUSTED CERTIFICATE FOR YOUR WEB SERVER. You should only use this program if you are a developer interested in experimenting with the ACME protocol or in helping to improve this software. If you want to configure your web site with HTTPS in the meantime, please obtain a certificate from a different authority. + +For updates on the status of Let's Encrypt, please visit the Let's Encrypt home page at https://letsencrypt.org/. diff --git a/letsencrypt/scripts/main.py b/letsencrypt/scripts/main.py index 989e07f96..0d76a1581 100755 --- a/letsencrypt/scripts/main.py +++ b/letsencrypt/scripts/main.py @@ -7,6 +7,7 @@ import argparse import logging import os +import pkg_resources import sys import confargparse @@ -191,10 +192,10 @@ def main(): # pylint: disable=too-many-branches, too-many-statements def display_eula(): """Displays the end user agreement.""" - with open("EULA") as eula_file: - if not zope.component.getUtility(interfaces.IDisplay).yesno( - eula_file.read(), "Agree", "Cancel"): - sys.exit(0) + eula = pkg_resources.resource_string("letsencrypt", "EULA") + if not zope.component.getUtility(interfaces.IDisplay).yesno( + eula, "Agree", "Cancel"): + sys.exit(0) def read_file(filename):