12 Commits
Author SHA1 Message Date
yomnaandBrad Warren d7f9859c3f [#3866]: "certbot certificates" checks validity with OpenSSL (#4155)
* cert signature validation for certificates subcommand + a test

* refactoring validation + adding in a check for making sure that the private key matches the certificate

* adding testing certs

* assertIsNone(x) -> assertEqual(None,x) to unbreak the py2.6 tests

* modifying test_verifu_renewable_cert_failure to hopefully appease python 3 test timeouts

* updating cryptography to be >=1.2 so that we can use verify

* removing unused, old testing certificate

* adding better error handling/logging

* adding test for IOError

* switching to a 2048 bit rsa key
2017-05-31 15:04:41 -07:00
Jeff R. AllenandBrad Warren bbbfc473d3 Handle mixed case domains in CSRs (#4685)
Lowercase domains from CSR, just like the domains from the
command line are.

Fixes #4684
2017-05-19 13:54:00 -07:00
Jacob Hoffman-AndrewsandBrad Warren cacee80c51 Move make_csr into acme.crypto_util (#4165)
It's relatively finicky to make a CSR appropriate to pass to poll_and_request_issuance. I think most users want to be able to give a list of domains and a private key, and get back a CSR. This branch adds that functionality to crypto_util.

Note that the two new functions take arguments, and return values, as PEM-encoded buffers. This is a departure from some existing ACME interfaces that take PyOpenSSL types. I've discussed with the Certbot team, and we agree that this is broadly the direction the ACME API should take, so that users of the module don't need to import PyOpenSSL themselves, or use its primitives.

* Add make_csr.

* accept privkey

* Tweak API.

* Remove make_csr from certbot package.

* Skip test in older Pythons.

* Move get_Extensions call under protection.

* Remove assertIn because not backwards-compatible.

* Fix encoding, and use PEM.

* Fix test

* Fix tests on py35.

* Fix error in test.

* Make import_csr_file always return PEM.

Also delete get_sans_from_csr (unused) and get_names_from_csr (newly unused).

* Fix function doc.

* Fix indent

* Fix call of obtain_certificate_from_Csr

* lint

* Handle review feedback.

* Fix test.
2017-04-07 09:43:33 -07:00
Thomas Mayer 0e237e1c0b Preserve --must-staple in configuration for renewal (#3844) 2016-12-03 06:59:32 +01:00
Brad WarrenandPeter Eckersley cb613ba7d3 Create symlinks at runtime and don't use relative paths (#3600)
* Create symlinks at runtime in cli_test.py

* use test_util.vector_path rather than hardcoding path

* Reference #2716 in comment about too many lines in cli.py
2016-10-10 13:17:49 -07:00
Joona Hoikkala 093ebd2f03 Tests 2016-07-30 11:49:04 +03:00
Brad Warren 02cdb5db0e Add cert with not alphabetically first CN 2016-06-09 16:03:32 -07:00
Peter Eckersley 883510338c Merge branch 'master' into sysd_os 2016-05-27 14:48:03 -07:00
Brad Warren 0b85a8f1c8 Add a test for a CSR with no domains 2016-05-20 17:37:48 -07:00
Joona Hoikkala 9af0994ca6 More verbose UA & test UA test fixes 2016-04-29 16:23:52 +03:00
Joona Hoikkala c2a5fb7f21 Re-add test file 2016-04-16 16:03:46 +03:00
Brad Warren 3961b70deb s/letsencrypt/certbot 2016-04-13 16:03:59 -07:00