-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ACME version 2 #104
Closed
Closed
Use ACME version 2 #104
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import only Python 3 modules.
Set `universal_newlines` argument to True for `subprocess.Popen` calls that require the `stdout_data` from `proc.communicate()` to be of type `str`.
- Convert `b` to `bytes` if it is a `str`. - Convert the base64 encoded `bytes` to `str` before using `replace` for stripping `=`.
Files opened using `tempfile.NamedTemporaryFile` are opened by default in binary mode. Writing `str` to the temporary file causes it error out.
Update error handling sections to treat the result of `HTTPError.read` as `bytes`.
Decode `signed_der64` to `str` before passing it to `textwrap.wrap`.
Encode accountkey_json (to bytes) before passing to hashlib.sha256.
- Import urllib.request - Remove python2 urllib2 import.
Set `universal_newlines` argument to True for the `subprocess.Popen` that reads the public key so that the `out` returned from proc.communicate is of type `str`.
Files opened using `tempfile.NamedTemporaryFile` are opened by default in binary mode. Writing `str` to the temporary file causes it error out.
- Convert `b` to `bytes` if it is a `str`. - Convert the base64 encoded `bytes` to `str` before using `replace` for stripping `=`.
Initial version.
The ACME v2 of the sign_csr.py and revoke_crt.py require the user account private key.
Update this section to reflect the ACME v2 version of the `sign_csr.py` script.
@diafygi, would you be interested in merging this? |
This is awesome, thank you! I'll use your fork since it seems this repo is no longer being updated. |
I'll be maintaining a fork of acme-nosudo at https://github.com/r5d/acmens |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors both
sign_csr.py
andrevoke_crt.py
to use ACME version 2.Demo:
- https://ricketyspace.net/tmp/sign-csr-acmev2-demo.mkv
- https://ricketyspace.net/tmp/revoke-crt-acmev2-demo.mkv
Summary of changes:
sign_csr.py
andrevoke_crt.py
use the helper functionsfrom the github.com/diafygi/acme-tiny.
Let's Encrypt account private key. It becomes tedious ask the
user to manually sign for every request.
sign_csr.py
andrevoke_crt.py
maybe encrypted.
openssl
directly asks the user for the passphraseif it's encrypted (This is illustrated in the demo videos).
file_based
option is the default.sign_csr.py
no longer provides the simple HTTP serverto serve the challenge files.
files on the domain server.
Addresses issue #100.