Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace assertion from BotanTLSStream with a warning message. #1964

Merged
merged 1 commit into from
Oct 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tls/vibe/stream/botan.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
Botan TLS implementation
Copyright: © 2015 RejectedSoftware e.K., GlobecSys Inc
Authors: Sönke Ludwig, Etienne Cimon
Expand Down Expand Up @@ -67,7 +67,12 @@ class BotanTLSStream : TLSStream/*, Buffered*/

@property string alpn() const @trusted { return m_tlsChannel.underlyingChannel().applicationProtocol(); }

@property TLSCertificateInformation peerCertificate() { assert(false, "Incompatible interface method requested"); }
@property TLSCertificateInformation peerCertificate()
{
if (!!m_peer_cert)
logWarn("BotanTLSStream.peerCertificate is not implemented and does not return the actual certificate information.");
return TLSCertificateInformation.init;
}

// Constructs a new TLS Client Stream and connects with the specified handlers
this(InterfaceProxy!Stream underlying, BotanTLSContext ctx,
Expand Down