I'm a System and Network Administrator. I post my ongoing research at blkcipher.pl.
Some of my blog posts [PL]
Open source tool to help you build a valid SSL certificate chain.
License: GNU General Public License v3.0
I'm a System and Network Administrator. I post my ongoing research at blkcipher.pl.
Some of my blog posts [PL]
Next Release: testing
Status: In Progress
The problem is the lack of the CN field for the last certificate in the chain.
How can reproduce the problem?
Properly chain for google.com is:
Certificate chain
0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=*.google.com
i:/C=US/O=Google Inc/CN=Google Internet Authority G2
1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2
i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
echo | openssl s_client -connect google.com:443 -servername google.com -showcerts
Download all certificates (manually)
Run sslmerge:
sslmerge -i /tmp/example/ -o /tmp/output.crt
(ServerCertificate.crt)
(Identity Certificate)
S:(a18bd28a):(*.google.com)
I:(c4c7a654):(GoogleInternetAuthorityG2)
(Intermediate1.crt)
(Intermediate Certificate)
S:(c4c7a654):(GoogleInternetAuthorityG2)
I:(2c543cd1):(GeoTrustGlobalCA)
(Intermediate2.crt)
(Intermediate Certificate)
S:(2c543cd1):(GeoTrustGlobalCA)
I:(578d5c04):()
(RootCertificate.crt)
(Root Certificate)
S:(578d5c04):()
I:(578d5c04):()
Result: chain generated correctly
You will see empty fields for the certificate marked with an identifier 578d5c04.
For example:
mkchain --in https://example.com
Next Release: testing
Status: In Progress
Added a root certificate to the certificate chain with the --with-root
parameter.
Creating correct certificate chains for OCSP is quite confusing - it would be very useful if sslmerge could generate them. As far as I can see it should include the intermediate and root certs, but not the leaf cert, so if a normal chain cert is leaf -> intermediate, the matching OCSP chain should be intermediate -> root.
Since we already have --with-root
, this could perhaps be combined with a new --without-leaf
option to achieve this.
The default value for _system_ca_path set in src/init is not right for FreeBSD. Changing this value with another path is not taken into account because code has hard-coded values:
$ sslmerge -i foobar.crt -o foobar-full.crt find: /etc/ssl/certs/: No such file or directory sed: 1: "$a-----END CERTIFICATE- ...": command a expects \ followed by text [!] bad certificate (maybe broken): foobar.crt
More importantly, upon error, the certificate file used as input is cleared (content erased).
Current use of command readlink in shell script code is not compatible with macOS:
sample error upon execution:
readlink: illegal option -- f usage: readlink [-n] [file ...] /usr/local/bin/sslmerge: line 57: ./../src/settings: No such file or directory /usr/local/bin/sslmerge: line 59: ./../src/helpers: No such file or directory /usr/local/bin/sslmerge: line 61: ./../src/__init__: No such file or directory /usr/local/bin/sslmerge: line 66: __main__: command not found /usr/local/bin/sslmerge: line 68: _exit_: command not found
Next Release: testing
Status: In Progress
More information about certificate chain on the result.
Further to #8, I'm very confused as to how to create valid OCSP certificate chains for dual stack (ECC + RSA) certificates. This comes up in things like nginx, where we can say:
ssl_certificate /etc/ssl/example.com.combined.crt;
ssl_certificate_key /etc/ssl/example.com.key;
ssl_certificate /etc/ssl/example.com-ecc.combined.crt;
ssl_certificate_key /etc/ssl/example.com-ecc.key;
ssl_trusted_certificate /etc/ssl/cert-bundle-rsa-ecc.crt;
so we have multiple certificates, but only a single opportunity to specify a trusted cert chain to use for OCSP. I don't know exactly how this should be formatted since it needs to contain 2 or more intermediate -> root chains, i.e. I don't know whether it should contain:
or
or, if they need to share a root (some ECC certs are signed using an RSA root):
So it would be very useful if sslmerge could help get this right.
(and yes, it is dumb that openssl can't figure out the cert order itself by matching IDs)
Status: In Progress
./bin/sslmerge -i example/github.com/all/ -o /tmp/chain.crt
sslmerge: invalid option -- 'i:o:'
Next Release: testing
Status: In Progress
Get certificate from URI and System CA store if only Server Certificate is given as a param.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.