Commit Graph

216 Commits (acmev1)

Author SHA1 Message Date
Richard Körber 78cb7259d4 Use certificate if already available on request time 2016-07-07 00:11:39 +02:00
Richard Körber 7eec503d55 Return registration status 2016-07-07 00:11:26 +02:00
Richard Körber 7eb2fe5945 Use original error detail message on conflict errors 2016-07-07 00:11:02 +02:00
Richard Körber cb5a853715 Read response after modifying a registration 2016-07-07 00:10:36 +02:00
Richard Körber 1adfb8c9df Add method to update registration. 2016-07-07 00:08:01 +02:00
Richard Körber 3403c69985 Major refactoring and improved API.
- AcmeClient is replaced by a Session object.
- Server communication has been moved from AcmeClient to the resource classes.
- Removed clutter from API (e.g. internal setters).
- Updated documentation and added a migration guide.
2016-07-07 00:02:09 +02:00
Richard Körber 05cc02dca6 Fixed missing JSON debug output 2016-06-22 00:47:48 +02:00
Richard Körber b72d0ee66f Update key rollover to current acme draft 2016-06-22 00:47:03 +02:00
Richard Körber c48febda62 Move jwkThumbprint() to SignatureUtils, add unit test 2016-06-22 00:45:57 +02:00
Richard Körber ddac0c45d1 Add support for oob-01 challenge 2016-06-21 00:01:40 +02:00
Richard Körber 279e0f3993 Evaluate Retry-After header on rate limit excess 2016-06-21 00:00:16 +02:00
Richard Körber 5dc1b9314e Accounts and registrations are now deactivated, not deleted 2016-06-13 23:17:30 +02:00
Richard Körber 1c2b7392e4 Minor formatting fixes 2016-06-09 22:56:13 +02:00
Richard Körber 288bf31c24 AcmeProtocolException is sufficient for recursion excess 2016-06-09 22:55:53 +02:00
Richard Körber 726aff9b80 Assert that relation is 'up' 2016-06-09 22:55:07 +02:00
Richard Körber 24b11fe5a9 Merge pull request #16 from cargy/fetch_cert_chain
add support for fetching certificate chain
2016-06-09 22:52:09 +02:00
Richard Körber 5e3167ac06 [maven-release-plugin] prepare for next development iteration 2016-06-03 20:26:01 +02:00
Richard Körber a2e8bc2076 [maven-release-plugin] prepare release v0.5 2016-06-03 20:26:01 +02:00
Richard Körber 859622ed9e Tests seem to require BC on OpenJDK 2016-06-03 20:14:22 +02:00
argy b13c90b7a4 fixed code formatting issues and added copyright header 2016-06-02 23:24:44 +03:00
Wojciech Szarmach 048994de8e Code style issues fix 2016-06-02 14:07:00 +02:00
argy d5b4ff37dc add support for fetching certificate chain 2016-05-29 03:44:27 +03:00
Wojciech Szarmach 428ca84613 Whitespace fix 2016-05-24 10:54:31 +02:00
Wojciech Szarmach 21092fc647 DefaultConnection stream reading fix 2016-05-24 10:51:13 +02:00
Richard Körber 093ab147b6 [maven-release-plugin] prepare for next development iteration 2016-04-16 15:12:12 +02:00
Richard Körber 9041b08a4f [maven-release-plugin] prepare release v0.4 2016-04-16 15:12:12 +02:00
Richard Körber 92b3076031 Remove account recovery. Closes issue #1. 2016-03-21 23:28:46 +01:00
Richard Körber 19787f4c00 Also accept 'urn:ietf:params:acme:error' error responses 2016-03-21 23:12:24 +01:00
Richard Körber b8bfc5fa0f Remove proof-of-possession challenge. Closes issue #4. 2016-03-21 22:35:36 +01:00
Richard Körber bc8c8f24f0 Accept an optional address for http-01 challenge 2016-03-19 16:20:58 +01:00
Richard Körber 8deceb473c Add support for tls-sni-02 2016-03-19 15:42:22 +01:00
Richard Körber acd6f8019d Add method to delete an authorization 2016-03-19 13:53:54 +01:00
Richard Körber 23bd838928 Add method to delete an account 2016-03-19 13:39:16 +01:00
Richard Körber 9ce3718861 Expect Account Key Roll-Over to return HTTP_OK on success 2016-03-19 13:05:57 +01:00
Richard Körber 158c3c46d1 Review exceptions, closes issue #10 2016-03-17 00:58:32 +01:00
Richard Körber 4e3b30fc78 Accept EC keys on changeRegistrationKey() 2016-03-10 01:40:34 +01:00
Richard Körber 6f122e63f1 Accept null for JSON problem type and detail 2016-02-20 13:58:04 +01:00
Richard Körber 749abc8f99 Fix detection of NIST P521. Add unit tests for SignatureUtils. 2016-02-02 00:08:31 +01:00
Richard Körber 99edd1032c [maven-release-plugin] prepare for next development iteration 2016-01-31 17:44:31 +01:00
Richard Körber 74b52ae77b [maven-release-plugin] prepare release v0.3 2016-01-31 17:44:31 +01:00
Richard Körber 82a6eb16cb Add version number to challenge classes 2016-01-31 17:08:55 +01:00
Richard Körber 162c2c3773 Support ECC in JWS 2016-01-31 14:47:02 +01:00
Richard Körber 1b83115892 Merge Account and Registration, simplify API 2016-01-28 23:55:09 +01:00
Richard Körber d4a8d449c9 Add Account Key Roll-over 2016-01-16 16:23:01 +01:00
Richard Körber d7adc5d486 Change 'proofOfPossession' to 'proof-of-possession' 2016-01-11 01:28:50 +01:00
Richard Körber 289c71bb4e [maven-release-plugin] prepare for next development iteration 2016-01-09 17:28:53 +01:00
Richard Körber e49bf4e8f2 [maven-release-plugin] prepare release v0.2 2016-01-09 17:28:53 +01:00
Richard Körber c83df44eed Expire resource directory cache.
A long term AcmeClient instance could miss changes to the directory,
so the cache is invalidated after 1 hour.
2016-01-09 17:23:05 +01:00
Richard Körber 06ccd6f2e1 Add a rate limit exception 2015-12-26 18:20:57 +01:00
Richard Körber fa31a1cf94 Parse dates, use Date instead of String 2015-12-26 18:15:05 +01:00
Richard Körber 74750a9f88 Add a RFC3339 parser 2015-12-26 18:00:07 +01:00
Richard Körber 5e699df6c1 [maven-release-plugin] prepare for next development iteration 2015-12-25 14:51:27 +01:00
Richard Körber 4414abb1d2 [maven-release-plugin] prepare release v0.1 2015-12-25 14:51:27 +01:00
Richard Körber fefc71b21f Use GenericTokenChallenge for unknown challenge types with token 2015-12-24 16:30:51 +01:00
Richard Körber 9b458fb2b6 Add a GenericTokenChallenge. Remove boilerplate code. 2015-12-24 16:29:35 +01:00
Richard Körber ade0207d6d Clean out challenge API 2015-12-24 16:28:57 +01:00
Richard Körber 0f56583c18 Add ProofOfPossession challenge 2015-12-24 16:24:34 +01:00
Richard Körber 34c7950c75 Use PublicJsonWebKey instead of JsonWebKey 2015-12-24 16:13:16 +01:00
Richard Körber f87dba266f ClaimBuilder also returns a Map representation 2015-12-24 16:12:35 +01:00
Richard Körber 0e7da2a1d0 Add TLS-SNI challenge 2015-12-22 23:34:16 +01:00
Richard Körber 37dcb1f64b Fix copy&paste error 2015-12-22 23:30:22 +01:00
Richard Körber 2898642ebf Do not remove location data from Registration on modify 2015-12-21 23:34:17 +01:00
Richard Körber b00114ad88 Add contact-based recovery 2015-12-21 01:32:30 +01:00
Richard Körber 8168e6efc7 Extract Status enum. Make Authorization use it. 2015-12-21 00:28:39 +01:00
Richard Körber 41dabd0cfd Add updateAuthorization() method to get the current authorization state 2015-12-21 00:10:03 +01:00
Richard Körber 8b0f266455 Rename updateAccount to modifyAccount
Reserve the term "update" for updating DTOs to the current server state
2015-12-20 23:24:45 +01:00
Richard Körber 7d9d851046 Make DTOs and Challenges serializable 2015-12-20 22:46:50 +01:00
Richard Körber 5b5500d373 Show challenge type value in javadoc 2015-12-20 22:46:34 +01:00
Richard Körber 46daaa8cfd Check parameters and types
Test for null pointers and invalid parameters.
Check if json content matches challenge type.
Enforce PublicKey when no private key instance should be used.
2015-12-20 22:46:34 +01:00
Richard Körber 06a600fec1 Registration contact is an URI now 2015-12-20 22:46:34 +01:00
Richard Körber 3d49f8d094 Review AcmeExceptions 2015-12-20 22:46:34 +01:00
Richard Körber ac2af16950 Check connection state 2015-12-20 22:46:34 +01:00
Richard Körber 1d34b07b6d Add a special exception type for 'unauthorized' errors 2015-12-20 22:46:34 +01:00
Richard Körber 9e93327818 Add support for certificate revocation 2015-12-20 13:09:10 +01:00
Richard Körber 6b1797c453 Remove account parameter where not used 2015-12-20 12:39:44 +01:00
Richard Körber f4cd15da65 Constructor for creating a Registration with a location URI 2015-12-20 12:21:20 +01:00
Richard Körber db927300e9 Add method to restore a Challenge 2015-12-20 12:18:24 +01:00
Richard Körber c97392236d Use Replay-Nonce header from directory request
If there is a Replay-Nonce on the first GET request on the directory resource,
use it. It saves us a HEAD request before the first POST request.
2015-12-19 17:35:53 +01:00
Richard Körber 1e1056d692 DnsChallenge: return digest for TXT record 2015-12-19 16:38:32 +01:00
Richard Körber becab450d8 Fix connection error 2015-12-19 14:46:50 +01:00
Richard Körber 9bcd5a2dd4 Add full documentation 2015-12-19 14:06:09 +01:00
Richard Körber afaf286a49 Lets Encrypt SSLSocketFactory is a singleton 2015-12-18 00:34:19 +01:00
Richard Körber dba96d0531 Fix broken javadocs, again... 2015-12-18 00:32:09 +01:00
Richard Körber 251e5af317 Add unit tests for AbstractAcmeClient 2015-12-18 00:31:55 +01:00
Richard Körber 4c02421114 Some minor ACME compliance fixes 2015-12-18 00:29:59 +01:00
Richard Körber 97d0856a04 Log HTTP headers in debug mode 2015-12-18 00:29:33 +01:00
Richard Körber e6cfc3d159 Check status of directory GET request 2015-12-18 00:29:15 +01:00
Richard Körber 5fc97fab34 Evaluate terms-of-service header. Agreement property is now type URI. 2015-12-16 00:53:31 +01:00
Richard Körber 7ecf5674c9 Improve HTTP status code and JSON problem handling 2015-12-16 00:51:57 +01:00
Richard Körber e3ff6043df More debug log output 2015-12-16 00:50:55 +01:00
Richard Körber 943f604a21 Get link relations from response header 2015-12-16 00:50:12 +01:00
Richard Körber 575902bd60 Extract X509Certificate for testing 2015-12-16 00:47:09 +01:00
Richard Körber daf84bd3c0 Unit test for GenericAcmeClient 2015-12-16 00:46:41 +01:00
Richard Körber 045968a423 Split Connection into interface and implementation 2015-12-16 00:46:16 +01:00
Richard Körber a775cf868f Move Let's Encrypt provider to main module.
There is no good reason to place providers in separate modules.
2015-12-16 00:45:32 +01:00
Richard Körber c45c29226e Simplified challenge creation 2015-12-16 00:45:14 +01:00
Richard Körber 5c68fcae40 Fix javadoc errors 2015-12-16 00:44:31 +01:00
Richard Körber 0f4d5e114d Refactor, use new HttpConnector for connecting to server 2015-12-13 19:37:27 +01:00
Richard Körber b12ee4a28a Add unit tests for AcmeClientProviders 2015-12-13 19:36:24 +01:00
Richard Körber 62ed304f3a Refactor, make AbstractAcmeClientProvider easier to use (and test) 2015-12-13 19:35:21 +01:00
Richard Körber 7097f23a2d Add unit tests for acme4j-client 2015-12-13 19:34:58 +01:00
Richard Körber 1267684614 Fail if no keypair is set 2015-12-13 19:25:57 +01:00
Richard Körber 535543e7b1 Check content-type header 2015-12-13 19:25:35 +01:00
Richard Körber 618dc27fbf Validate nonce header 2015-12-13 19:25:28 +01:00
Richard Körber fbadeb62bf Rename readResourceMap to readDirectory 2015-12-13 19:25:18 +01:00
Richard Körber fb3f56921d Avoid parameter variable name clashes 2015-12-13 19:24:28 +01:00
Richard Körber 26b86b8f72 Fail if auth key is read without prior authorization 2015-12-13 19:22:18 +01:00
Richard Körber 2d5261f592 Use String for expiry date, as Date would require joda-time 2015-12-13 19:21:35 +01:00
Richard Körber 04fe570811 Return null if no URI is set 2015-12-13 19:21:01 +01:00
Richard Körber b7af1060cd Add unit tests for AcmeClientFactory 2015-12-13 19:20:30 +01:00
Richard Körber 0410257042 Throw an AcmeException if the acme URI cannot be resolved 2015-12-13 19:20:14 +01:00
Richard Körber 298dfbc161 Add unit tests for Authorization 2015-12-13 19:19:08 +01:00
Richard Körber 3ee7a06e6f Extend findCombination behavior.
The mandant passes in all challenge types it supports, and the method returns the shortest combination required for validation.
2015-12-13 19:18:39 +01:00
Richard Körber 5459676431 Add unit tests for ClaimBuilder 2015-12-13 19:17:26 +01:00
Richard Körber 1e9855bf05 Use URI instead of plain string parsing 2015-12-10 23:45:12 +01:00
Richard Körber 7e07a0e2e4 Project start 2015-12-09 01:24:03 +01:00