Commit Graph

589 Commits

Author SHA1 Message Date
Roland Shoemaker 00b617b59a Switch to upstream square/go-jose + pull latest 2016-03-15 13:54:22 -07:00
Kane York cf9c14eff7 Merge branch 'master' into json-policy2 2016-03-15 09:15:43 -07:00
Kane York 21700ffec5 Improve mocks.Mailer to check To: line 2016-03-14 17:08:44 -07:00
Jacob Hoffman-Andrews 9b9b09d35d Fix issues from review feedback. 2016-03-14 16:15:54 -07:00
Jacob Hoffman-Andrews bc28bfe906 Implement reloadable JSON blacklist.
This eliminates the need the a database to store the hostname policy,
simplifying deployment. We keep the database for now, as part of our
deployability guidelines: we'll deploy, then switch config to the new style.

This also disables the obsolete whitelist checking code, but doesn't yet change
the function signature for policy.New(), to avoid bloating the pull request.
I'll fully remove the whitelist checking code in a future change when I also
remove the policy database code.
2016-03-13 20:00:51 -07:00
Roland Shoemaker ce9d2b9280 Fix numLogs check in OCSP-Updater 2016-03-11 13:42:03 -08:00
Jacob Hoffman-Andrews c61bd7bfc0 Merge branch 'master' into full-window 2016-03-10 17:09:48 -08:00
Kane York 327a760311 expiration-mailer: don't mail if exact-renewal already
If a certificate has already been issued with the same set of FQDNs, it
is considered to be renewed and no expiration mail is sent.

Also, use the connection string in the test/vars package instead of
copying it all around.
2016-03-09 10:58:56 -08:00
Roland Shoemaker 09a14627c1 Use full window when looking for new serials not just batchSize 2016-03-08 16:39:19 -08:00
Kane York a6317d1717 Introduce cmd.Clock() for use in integration tests
If the FAKECLOCK environment variable is set, and the build was in a
test environment, cmd.Clock will return a FakeClock with the time set to
the content of the environment variable.

The choice of the UnixDate format was because `date -d` is a common
choice for shell scripts.
2016-03-07 14:52:34 -08:00
Jacob Hoffman-Andrews 109bec1f21 Fix tests by adding DNSNames. 2016-03-06 19:58:53 -08:00
Roland Shoemaker b91a152148 Simplfy backoff + collect stats on cfssl and pkcs11 errors 2016-03-02 15:54:54 -08:00
Roland Shoemaker c4dd3506aa Remove CA HSM lockout and make the OCSP updater CA backoff more HSM specific 2016-03-01 14:22:12 -08:00
Kane York c8614e21c5 Add call to cfssl SetLogger, remove TODO
Fixes #1528
2016-02-29 15:39:57 -08:00
Roland Shoemaker 1e7a2e7003 Actually set insecure if not using AMQPS 2016-02-29 12:20:17 -08:00
Roland Shoemaker bee236af3a Merge branch 'master' into exact-name-rl 2016-02-26 14:20:13 -08:00
Roland Shoemaker e4a18a8738 Review fixes 2016-02-26 14:20:06 -08:00
Roland Bracewell Shoemaker a5da4acf61 Merge branch 'master' into pkcs11key 2016-02-25 11:58:48 -08:00
Kane York b46b7d0bb4 Switch to letsencrypt copy of pkcs11key
Closes #1527
2016-02-25 10:24:43 -08:00
Roland Shoemaker 78ae233a81 Switch SubmitToCT to use AddChainWithContext
google/certificate-transparency provides a new method, AddChainWithContext,
that allwos us to cancel a submission attempt if it takes longer than a
provided timeout using context.WithTimeout. Also refactor the initialization
method and fix a previously broken test (related to Retry-After headers).
2016-02-24 16:20:12 -08:00
Roland Shoemaker ac23d20282 Merge branch 'master' into exact-name-rl 2016-02-22 22:56:18 -08:00
Roland Shoemaker ee7a86e07d Review fixes 2016-02-22 22:56:07 -08:00
Kane York df6bb5126a Set the mysql logger in shell.go/StatsAndLogging()
Fixes #1507
2016-02-22 16:15:08 -08:00
Roland Shoemaker 8fb87b7e7f Add exact FQDN set rate limit
Adds a new rate limit, certficatesPerFQDNSet, which counts certificates
with the same set of FQDNS using a table containing the hash of the dNSNames
mapped to a certificate serial. A new method is added to the SA in AddCertificate
to add this hash to the fqdnSets table, which is gated by a config bool.
2016-02-19 15:58:07 -08:00
Jacob Hoffman-Andrews 9dcd6e3e3e Add config flag to enable must staple.
This ensures we don't try to pass the must staple extension to CFSSL until we've
also enabled it in AllowedExtensions in our CFSSL profile.
2016-02-19 14:52:23 -08:00
Jessica Frazelle 7955e268c7
go lint fixes
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-02-17 11:36:06 -08:00
Jessica Frazelle 3df2e942be
go fmt fixes
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-02-16 12:19:15 -08:00
Jeff Hodges 1498381e76 issue without a CommonName if not given one
It's behind a new temporary config flag.

Also, check if the CN is over 64 bytes.

This also makes sure the certificate's Subject is not empty if the CN is
empty by always setting the SerialNumber in Subject.

While I was here, I also corrected the logged hex encoding of
SerialNumber so that its prefixed by zeroes correctly. See the use of
core.SerialToString in IssueCertificate.

I also added a test for the no CommonName and no SANs case.

Fixes #40
2016-02-12 11:49:16 -08:00
Jacob Hoffman-Andrews 0fda27e15a Remove checking of ocspResponses table.
We now use the certificateStatus table.
2016-02-09 10:36:41 -08:00
Jeff Hodges 57b6dd5bb5 make HTTPMonitor a http.Handler 2016-02-01 22:01:21 -08:00
Jeff Hodges c156f99106 ocsp-responder: 200 on GET /
Some stat services, we believe, are saying the ocsp-responder is down
because / returns 400 Bad Request currently.

Shuffle some code into a new `mux` function to make it easier to test.
2016-02-01 20:03:45 -08:00
Roland Shoemaker c3a6a837a4 Merge branch 'master' into more-revoker 2016-02-01 15:38:05 -08:00
Jeff Hodges 8e8161f94b dedup emails sent to same reg in given batch
This deduplicates the certificate expiration emails sent to a given
registration in a given batch defined by the Mailer.CertLimit option.

Fixes #1358.
2016-01-27 20:39:52 -08:00
Roland Shoemaker 7ea91448e4 Merge branch 'master' into more-revoker 2016-01-27 13:51:36 -08:00
Jeff Hodges 6233be1ff0 Merge branch 'master' into smtp-secret 2016-01-27 11:00:55 -08:00
Roland Shoemaker 184b0b06bb Merge branch 'smtp-secret' of github.com:letsencrypt/boulder into smtp-secret 2016-01-26 15:48:33 -08:00
Roland Shoemaker b92d1b7ca9 Move test_secret file 2016-01-26 15:48:16 -08:00
Roland Shoemaker 29127d5779 Add tool to find orphaned certificates in boulder-ca logs 2016-01-26 15:43:23 -08:00
Jeff Hodges 49917cd3a2 Merge branch 'master' into smtp-secret 2016-01-26 15:37:51 -08:00
Jacob Hoffman-Andrews ad5ac41d67 Add email templates to RPM.
Also add a test that templates compile and run with current code.
2016-01-25 16:40:58 -08:00
Roland Shoemaker d1428e164e Add basic test 2016-01-25 11:47:30 -08:00
Roland Shoemaker f02864fb7e Read SMTP password from file 2016-01-24 15:35:04 -08:00
Hugo Landau f49028107e Allow CFSSL profiles to be selected by key type
Allows multiple CFSSL profiles to be defined. A profile is selected by
key type. ECDSA keys get one profile, RSA keys get another.

Either the "profile" config option or the "rsaProfile" and
"ecdsaProfile" config options must be specified. Both cannot be
specified. Specifying "profile" uses the same profile for RSA and ECDSA.

Fixes #1384
2016-01-22 11:00:41 +00:00
Roland Shoemaker 199e0f6e8d Review fixes 2016-01-15 13:51:14 -08:00
Roland Shoemaker 11661bab9e Merge branch 'master' into more-revoker 2016-01-15 13:41:55 -08:00
Jacob Hoffman-Andrews 6d33280249 Add default value for KeyPolicy.
This maintains our deployability guidelines, so the latest Boulder can be run
with the previous version of the config.
2016-01-12 12:14:36 -08:00
Roland Shoemaker a77c8e3d5b Switch to single RevokeAuthorizationsByDomain SA method 2016-01-12 11:49:51 -08:00
Jacob Hoffman-Andrews 556afa3547 Reuse a single connection to SMTP server.
Also, add a Subject config field and use TLS-wrapped SMTP if appropriate.
2016-01-11 15:51:54 -08:00
Roland Shoemaker cbdf0444b6 review fixes 2016-01-08 16:21:12 -08:00
Jeff Hodges 502aea76db Merge branch 'master' into mail-from 2016-01-07 15:13:42 -08:00