Skip to content

Commit

Permalink
Replace assertion from BotanTLSStream with a warning message. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Oct 24, 2017
1 parent c50c962 commit 44b9cde
Showing 1 changed file with 7 additions and 2 deletions.
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

0 comments on commit 44b9cde

Please sign in to comment.