Commit Graph

111 Commits

Author SHA1 Message Date
Jacob Hoffman-Andrews d5bb20561f Fix nil dereference in AcmeURL unmarshal and in validateContacts. 2015-12-04 09:46:46 -08:00
Jacob Hoffman-Andrews 169a0b79e3 Export BuildID via expvars. 2015-11-24 14:24:51 -08:00
Roland Shoemaker 458c7e2b4a Add badNonce error as described in the specification 2015-11-20 15:57:22 -08:00
Roland Shoemaker 661476f40e Backoff OCSP Updater on HSM failure
If a ServiceUnavailableError is returned from GenerateOCSP backoff before
attempting to retry the call as to not to overwhelm the CA with calls that
may instantly fail.
2015-10-26 14:06:32 -07:00
Richard Barnes 3637dfb0c1 ServiceUnavailableError 2015-10-21 16:25:43 -04:00
Jeff Hodges 0df44e5d90 clean up CSRs with capitalized letters
This change lowercases domains before they are stored in the database
and makes policy.WillingToIssue reject any domains with uppercase
letters.

Fixes #927.
2015-10-08 17:04:07 -07:00
Richard Barnes b01e99ea04 Merge branch 'master' into golint 2015-10-07 10:42:36 -04:00
Richard Barnes b6469b4bba Merge branch 'master' into golint 2015-10-06 23:04:23 -04:00
bifurcation f210ee0a9f Merge branch 'master' into sig-reuse 2015-10-06 18:01:50 -04:00
Jeff Hodges 06879cb44f remove some allocations from B64enc codepath
B64enc makes some nasty allocations through its use of strings.Replace
in unpad. This changes that strings.Replace into a simple for-loop.

B64enc gets used in many places, including the rpc library on every
request and response. While we should probably not use it in the rpc
library (#909), there are enough other places it's used (now or in the near
future) that make this valuable.

Was a performance problem found during early load-testing (#20) of the
CA. More to come.
2015-10-06 00:31:51 -07:00
Richard Barnes f064c6d5c7 Merge branch 'master' to 'sig-reuse' 2015-10-05 23:16:16 -04:00
bifurcation 90050e91f5 Merge branch 'master' into golint 2015-10-05 19:23:24 -04:00
Roland Shoemaker 4a98145992 Review fixes 2015-10-04 21:05:44 -07:00
Richard Barnes f3a40ac76c Address @jcjones comments 2015-10-04 23:24:06 -04:00
Richard Barnes 0f3f766d26 Fix golint in ./core 2015-10-04 20:07:13 -04:00
Richard Barnes 9414b1a37e Address @jmhodges comments and make tests pass 2015-10-03 14:47:17 -04:00
Richard Barnes a7a0f8d235 Change to KeyAuthorization in core 2015-10-03 12:58:05 -04:00
Richard Barnes b4d45321a8 Have the client provide the authorized key object 2015-10-02 13:45:32 -04:00
Jacob Hoffman-Andrews 6963811ab5 Merge remote-tracking branch 'le/master' into paranoid-key
Conflicts:
	core/util.go
2015-10-01 14:13:05 -07:00
Jacob Hoffman-Andrews 685c6e4206 Use stored key to verify JWS POSTs
instead of submitted key. This minimizes the chances of unexpected JWK fields in
the submitted key altering its interpretation without altering the lookup in the
registrations table.

In the process, fix handling of NoSuchRegistration responses.

Fixes https://github.com/letsencrypt/boulder/issues/865.
2015-09-29 23:37:16 -07:00
Roland Shoemaker 96afd94e88 Review fixes
* Rewrite JSONDuration as ConfigDuration that can handle both JSON and YAML unmarshaling
* Factor out RPC certificate count request struct
* Return 429 to WFE on rate limit exceeded
* Fix wonky RateLimitPolicy comment
2015-09-25 14:39:53 -07:00
Jacob Hoffman-Andrews 73216a461d Also check length >= 32. 2015-09-22 14:27:38 -07:00
Jacob Hoffman-Andrews c858b4d430 Consolidate serial number validity checking.
Also, set the requirement to be hexadecimal and <36 characters, rather than
exactly 36 characters.
2015-09-22 14:03:29 -07:00
Jacob Hoffman-Andrews 02314f4041 Implement the new 144-bit mostly-random serial.
To keep the change small, I have not yet completely removed the
GetCertificateByShortSerial method from interfaces and the RPC. I will do taht
in a follow up change.
2015-09-21 13:10:16 -07:00
Roland Shoemaker ff6eca7a29 Submit all issued certificates to configured CT logs
Adds a new service, Publisher, which exists to submit issued certificates to various Certificate Transparency logs. Once submitted the Publisher will also parse and store the returned SCT (Signed Certificate Timestamp) receipts that are used to prove inclusion in a specific log in the SA database. A SA migration adds the new SCT receipt table.

The Publisher only exposes one method, SubmitToCT, which is called in a goroutine by ca.IssueCertificate as to not block any other issuance operations. This method will iterate through all of the configured logs attempting to submit the certificate, and any required intermediate certificates, to them. If a submission to a log fails it will be retried the pre-configured number of times and will either use a back-off set in a Retry-After header or a pre-configured back-off between submission attempts.

This changeset is the first of a number of changes ending with serving SCT receipts in OCSP responses and purposefully leaves out the following pieces for follow-up PRs.

* A fake CT server for integration testing
* A external tool to search the database for certificates lacking a full set of SCT receipts
* A method to construct X.509 v3 extensions containing receipts for the OCSP responder
* Returned SCT signature verification (beyond just checking that the signature is of the correct type so we aren't just serving arbitrary binary blobs to clients)

Resolves #95.
2015-09-17 18:11:05 -07:00
Jacob Hoffman-Andrews 998ffc79cb Do GoodKey checking in WFE. 2015-09-09 20:30:55 -04:00
Jacob Hoffman-Andrews 2a8804b792 Merge branch 'master' into test-js-content-length
Conflicts:
	wfe/web-front-end_test.go
2015-09-02 23:23:53 -04:00
Jeff Hodges dedb5f96a7 clean up some pointer type conversions
I grepped around and only found these.
2015-08-31 23:51:43 -07:00
Jacob Hoffman-Andrews 9fa1e02d7d Require content length. 2015-08-30 12:59:43 -04:00
Richard Barnes c7eaece4da Have RA reject update by a different account key. 2015-08-25 17:50:26 -04:00
Jeff Hodges 0f03494d56 use pointer to AcmeURL everywhere
This has the benefit of not requiring us to copy very fat url.URL
objects when we pass them to funcs or call their methods.
2015-08-05 18:23:38 -07:00
Jacob Hoffman-Andrews 9423467142 Switch to our own fork of go-jose.
This is the result of `godep save -r ./...` and
`git rm -r -f Godeps/_workspace/src/github.com/square`

Our fork is currently at the head of go-jose when Richard made the local nonce
changes, with the nonce changes added on top. In other words, the newly created
files are exactly equal to the deleted files.

In a separate commit I will bring our own go-jose fork up to the remote head,
then update our deps.

Also note: Square's go-jose repo contains a `cipher` package. Since we don't
make any changes to that package, we leave it imported as-is.
2015-07-24 14:39:00 -07:00
Jacob Hoffman-Andrews 620a012c62 Rewrite go-jose dependencies to our fork. 2015-07-24 14:16:01 -07:00
J.C. Jones 41f5788c77 Correct most `go lint` warnings. (274 -> 5) 2015-06-16 22:18:28 -05:00
J.C. Jones 1474b7f21f Resolves Issue #344: Only send InternalServerError when needed
Basically, just send InternalServerError when it indicates an internal state
was broken.
2015-06-13 00:21:44 -05:00
J.C. Jones 76f7b1c1e4 Improve build identification
New example:

2015/06/09 09:20:13 Versions: boulder=(generate_ocsp +0c101f2 Tue Jun  9 16:20:06 UTC 2015) Golang=(devel +46b4f67 Thu Apr 16 20:01:13 2015 +0000) BuildHost=(user@vm.local)
2015-06-09 09:22:29 -07:00
James 'J.C.' Jones a3521bcb61 Merge pull request #277 from rolandshoemaker/check-cert
Check generated certificate matches CSR
2015-06-03 22:10:35 -07:00
Jacob Hoffman-Andrews 026cb424fc Revert "Replace RevokeCertficate with something more in line with the spec"
This reverts commit b1bad40fe6.

Conflicts:
	wfe/web-front-end.go
2015-06-02 10:45:54 -07:00
Roland Shoemaker e5bf16711c Add generated cert checks 2015-06-01 14:00:49 +01:00
Richard Barnes b1bad40fe6 Replace RevokeCertficate with something more in line with the spec 2015-06-01 02:11:10 -04:00
Richard Barnes c0bacc3fb6 Add more detailed error code reporting 2015-05-31 15:58:08 -04:00
Jacob Hoffman-Andrews 6a6a8aa72d Merge branch 'master' into goodkey
Conflicts:
	ca/certificate-authority.go
	ra/registration-authority.go
	ra/registration-authority_test.go
2015-05-29 12:26:24 -07:00
J.C. Jones 8766edaa93 Issue #239 - Add a build ID method to WFE, and print Info on startup for all 2015-05-28 11:13:09 -07:00
J.C. Jones 42302541bd Run `go fmt` for PR #186 2015-05-18 18:44:38 -07:00
Jacob Hoffman-Andrews aa8c20f84a Fixes in response to review feedback. 2015-05-13 17:36:39 -07:00
Jacob Hoffman-Andrews 3eed9e3f7c Move to Square's go-jose library. 2015-05-13 17:36:38 -07:00
Jacob Hoffman-Andrews cb00816e48 Merge branch 'goodkey' of github.com:letsencrypt/boulder into goodkey
Conflicts:
	ca/certificate-authority.go
	core/good_key.go
	core/good_key_test.go
2015-05-09 11:48:32 -07:00
Jacob Hoffman-Andrews 02421fefd9 Add tests. 2015-05-06 16:10:00 -07:00
Roland Shoemaker 771d6d9b6d add serial conv. functions and basic tests 2015-05-06 16:07:19 -07:00
J.C. Jones 9c272cebe8 Resolve comments from PR #141 2015-05-01 22:06:38 -07:00
Peter Eckersley 1543a71c3e Remove stray code... 2015-05-01 22:04:00 -07:00
Peter Eckersley f00848e115 Hypothetical RNG failure handling 2015-05-01 22:03:59 -07:00
J.C. Jones 4e0aa900c9 Rebase 'lint-errcheck-fixes' of git://github.com/mvdan/boulder to letsencrypt/master
Conflicts:
	cmd/boulder-start/main.go
	core/interfaces.go
	core/objects.go
	core/util.go
	ra/registration-authority.go
	ra/registration-authority_test.go
	rpc/rpc-wrappers.go
	va/validation-authority.go
	wfe/web-front-end.go
2015-03-20 18:01:03 -07:00
Richard Barnes d938deb3fd Separate resources for challenges [initial] 2015-03-14 19:07:16 -04:00
Richard Barnes 2c9ed3c792 Fixing errors discovered with increased testing. 2015-03-14 11:20:59 -04:00
Daniel Martí 91b12a2e1a Simplify if err != nil structure when applicable 2015-03-12 12:46:18 +01:00
Daniel Martí 880821801e hash.Hash.Write() never returns an error 2015-03-12 12:18:37 +01:00
Daniel Martí 083fb1b7e7 Ignore rand.Read() errors uniformly 2015-03-12 12:18:30 +01:00
Daniel Martí c931b559a8 Fix "if block ends with a return statement" 2015-03-12 12:13:50 +01:00
Richard Barnes b545ad6956 Pulling out ra module 2015-03-10 14:22:37 -07:00
Richard Barnes c6673ade2e Pulling out core module 2015-03-10 13:54:13 -07:00