proxygen
|
#include <DualTicketCipher.h>
Public Member Functions | |
DualTicketCipher (std::unique_ptr< TicketCipher > cipher, std::unique_ptr< TicketCipher > fallbackCipher) | |
folly::Future< folly::Optional< std::pair< std::unique_ptr< folly::IOBuf >, std::chrono::seconds > > > | encrypt (ResumptionState resState) const override |
folly::Future< std::pair< PskType, folly::Optional< ResumptionState > > > | decrypt (std::unique_ptr< folly::IOBuf > encryptedTicket) const override |
![]() | |
virtual | ~TicketCipher ()=default |
Private Attributes | |
std::unique_ptr< TicketCipher > | cipher_ |
std::unique_ptr< TicketCipher > | fallbackCipher_ |
Base class for using two ciphers for decryption. The idea behind this is that as we transition between psk contexts it might be useful to try multiple ciphers so that we don't break resumption on rollout.
Definition at line 21 of file DualTicketCipher.h.
|
inline |
Definition at line 23 of file DualTicketCipher.h.
|
inlineoverridevirtual |
Returns the ResumptionState for an opaque PSK, and the type of PSK (resumption or external).
Returns Rejected if the PSK is not recognized.
Implements fizz::server::TicketCipher.
Definition at line 35 of file DualTicketCipher.h.
References cipher_, folly::IOBuf::clone(), fallbackCipher_, folly::makeFuture(), folly::gen::move, fizz::Rejected, and ticket.
|
inlineoverridevirtual |
Returns an opaque PSK for ResumptionState, and its validity time.
Implements fizz::server::TicketCipher.
Definition at line 31 of file DualTicketCipher.h.
References cipher_, and folly::gen::move.
|
private |
Definition at line 50 of file DualTicketCipher.h.
|
private |
Definition at line 51 of file DualTicketCipher.h.
Referenced by decrypt().