File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 0.4.2 - 2022-04-09
4+
5+ ### Added
6+
7+ - Added [ TlsListener::replace_acceptor()] function to allow replacing the listener certificate at runtime.
8+
39## 0.4.1 - 2022-04-09
410
511### Changed
Original file line number Diff line number Diff line change 11[package ]
22name = " tls-listener"
33description = " wrap incoming Stream of connections in TLS"
4- version = " 0.4.1 "
4+ version = " 0.4.2 "
55authors = [
" Thayne McCombs <[email protected] >" ]
66repository = " https://github.com/tmccombs/tls-listener"
77edition = " 2018"
Original file line number Diff line number Diff line change 1717use futures_util:: stream:: { FuturesUnordered , Stream , StreamExt } ;
1818use pin_project_lite:: pin_project;
1919use std:: future:: Future ;
20- use std:: io;
2120use std:: marker:: Unpin ;
2221use std:: pin:: Pin ;
2322use std:: task:: { Context , Poll } ;
2423use std:: time:: Duration ;
24+ use std:: { io, mem} ;
2525use thiserror:: Error ;
2626use tokio:: io:: { AsyncRead , AsyncWrite } ;
2727use tokio:: time:: { timeout, Timeout } ;
@@ -136,6 +136,13 @@ where
136136 pub fn accept ( & mut self ) -> impl Future < Output = Option < <Self as Stream >:: Item > > + ' _ {
137137 self . next ( )
138138 }
139+
140+ /// Replaces the Tls Acceptor configuration, which will be used for new connections.
141+ ///
142+ /// This can be used to change the certificate used at runtime.
143+ pub fn replace_acceptor ( & mut self , acceptor : T ) {
144+ self . tls = acceptor;
145+ }
139146}
140147
141148impl < A , T > Stream for TlsListener < A , T >
You can’t perform that action at this time.
0 commit comments