Skip to content

add get_peer_certificate for @tls.Tls - #342

Merged
Guest0x0 merged 2 commits into
mainfrom
tls-get-certificate
Apr 20, 2026
Merged

add get_peer_certificate for @tls.Tls#342
Guest0x0 merged 2 commits into
mainfrom
tls-get-certificate

Conversation

@Guest0x0

Copy link
Copy Markdown
Collaborator

This PR adds a new method get_peer_certificate for @tls.Tls, which returns the certificate of the peer, in DER format. Note that not all TLS connection has/requires a peer certificate, so the return value may be None even if nothing goes wrong.

This method is useful for implementing server-endpoint style SASL channel binding.

@Guest0x0
Guest0x0 force-pushed the tls-get-certificate branch from d1a0611 to 41382b6 Compare April 20, 2026 08:00
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 207

Coverage decreased (-0.02%) to 78.607%

Details

  • Coverage decreased (-0.02%) from the base build.
  • Patch coverage: 2 uncovered changes across 2 files (4 of 6 lines covered, 66.67%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
src/tls/openssl.mbt 3 2 66.67%
src/tls/schannel.mbt 3 2 66.67%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4006
Covered Lines: 3149
Line Coverage: 78.61%
Coverage Strength: 62005.81 hits per line

💛 - Coveralls

@Guest0x0
Guest0x0 merged commit 578ede8 into main Apr 20, 2026
17 checks passed
@Guest0x0
Guest0x0 deleted the tls-get-certificate branch April 20, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants