Commit Graph

30 Commits (df3e9c0cd6d36aa82ed9e8ba8c08148c81fe7e98)

Author SHA1 Message Date
max furman 6e69f99310 Always set nbf and naf for new ACME orders ...
- Use the default value from the ACME provisioner if values are not
defined in the request.
4 years ago
Max ba91f4ed13
Merge pull request #260 from anxolerd/feat-force-cn-if-empty
[Feature] Force CommonName for certificates from ACME provisioner
4 years ago
Oleksandr Kovalchuk 893a53793a
Modify existing tests to accept forceCNOption modifier
Modify existing tests to pass with changes introduced in commit
322200b7db. This is safe to do as
tests assert exact length of modifiers, which has changed.
4 years ago
Oleksandr Kovalchuk 322200b7db
Implement modifier to set CommonName
Implement modifier which sets CommonName to the certificate if
CommonName is empty and forceCN is set in the config. Replace previous
implementation introduced in 0218018cee
with new modifier.

Closes https://github.com/smallstep/certificates/issues/259
Ref: https://github.com/smallstep/certificates/pull/260#issuecomment-628961322
4 years ago
max furman e1409349f3 Allow relative URL for all links in ACME api ...
* Pass the request context all the way down the ACME stack.
* Save baseURL in context and use when generating ACME urls.
4 years ago
Oleksandr Kovalchuk 0218018cee
Generate Subject if `forceCN` and Subject is empty
When `forceCN` is set in provisioner configuration and
Subject.CommonName is empty, set Subject.CommonName to the first SAN
from the CSR to follow the letsencrypt's boulder behavior. This is done
in order to support system which require certificate's Subject field to
be non-empty.

N.B. certbot does not send Subject in its certificate request and relies
on similar behavior of letsencrypt.

Closes https://github.com/smallstep/certificates/issues/259
4 years ago
Clive Jevons 639993bd09 Read host and protocol information from request for links
When constructing links we want to read the required host and protocol
information in a dynamic manner from the request for constructing ACME
links such as the directory information. This way, if the server is
running behind a proxy, and we don't know what the exposed URL should
be at runtime, we can construct the required information from the
host, tls and X-Forwarded-Proto fields in the HTTP request.
Inspired by the LetsEncrypt Boulder project (web/relative.go).
4 years ago
max furman 4cb777bdc1 ACME accountUpdate ignore fields not recognized by the server. 4 years ago
Ivan Bertona cb46a8b741 Small test fixes. 4 years ago
Ivan Bertona 10bc548c6e Remove leftover file. 4 years ago
Ivan Bertona 200cfd2433 Add test for missing TLS certificates in response. 4 years ago
Ivan Bertona 157686e338 Tiny finishes. 4 years ago
Ivan Bertona 6843408d42 Reject obsolete id-pe-acmeIdentifier. 4 years ago
Ivan Bertona 6b5a2b17b5 Add challenge unmarshal test cases. 4 years ago
Ivan Bertona b8208ec401 Add test case for failed came-tls/1 protocol negotiation. 4 years ago
Ivan Bertona 4b473732d9 Add support for TLS-ALPN-01 challenge. 4 years ago
max furman c255274572 Should be returning status code 400 for ACME Account Not Found.
Issue #173
4 years ago
Mariano Cano 0a890a5c16 Add the commonName as a DNSName to match RFC.
Normalize names and remove the use of reflection.
4 years ago
max furman 432ed0090f Use _'s in table names. 4 years ago
max furman 967e86a48b Simplify trimming *. prefix of domain in acme dns validation. 4 years ago
Oleksandr Kovalchuk ec8ff0bced
Add testcase which ensures we pass correct domain to lookupTxt
Make sure we do not pass domains with asterisk (wildcard) in the middle,
like _acme-challenge.*.example.com to lookupTxt function, but preprocess
domain and remove leading wildcard so we lookup for
_acme-challenge.example.com.
4 years ago
Oleksandr Kovalchuk 46832bb9b3
Remove superflurous Printf statement
The statement was used for debug purposes and should not be included in
the final build
4 years ago
Oleksandr Kovalchuk a995cca418
Perform domain normalization for wildcard domains
Perform domain normalization for wildcard domains, so we do query
TXT records for _acme-challenge.example.domain instead of
_acme-challenge.*.example.domain when performing DNS-01 challenge. In
this way the behavior is consistent with letsencrypt and records queried
are in sync with the ones that are shown in certbot manual mode.
4 years ago
Max 0a96062b76
Merge pull request #128 from jkralik/returnCertChain
Change api of functions Authority.Sign, Authority.Renew
5 years ago
max furman d368791606 Add x5c provisioner capabilities 5 years ago
max furman 7aec7c2612 Create ACME database tables when initializing ACME autority. 5 years ago
Jozef Kralik bc6074f596 Change api of functions Authority.Sign, Authority.Renew
Returns certificate chain instead of 2 members.

Implements #126
5 years ago
max furman e92dfb2516 Fix authz shadow declarations 5 years ago
max furman fe7973c060 wip 5 years ago
max furman e3826dd1c3 Add ACME CA capabilities 5 years ago