Closed pvthuyen closed 1 year ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
lib/mint/core/transport/ssl.ex | 2 | 3 | 66.67% | ||
<!-- | Total: | 2 | 3 | 66.67% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
test/support/mint/http1/test_server.ex | 1 | 84.62% | ||
<!-- | Total: | 1 | --> |
Totals | |
---|---|
Change from base Build 6b932144282495b5154a4f6f0db456f96c4ec363: | -0.1% |
Covered Lines: | 1320 |
Relevant Lines: | 1554 |
Thank you @pvthuyen. I added a test and updated the docs also.
Resolves https://github.com/elixir-mint/mint/issues/377
:public_key.cacerts_get/0
returnscombined_cert
which contains both the undecoded binary and the decoded#'OTPCertificate'{}
:public_key.pkix_decode_cert
with:plain
returns#'Certificate'{}
, both#'OTPCertificate'{}
and#'Certificate'{}
share very similar structure (document) and they both havesubjectPublicKeyInfo
andvalidity
. Since we only depends on those 2 data to verify the certificates, just passing the#'OTPCertificate'{}
from:public_key.cacerts_get/0
through should be sufficient