OpenVPN 3 Core Library
Loading...
Searching...
No Matches
test_crypto.cpp File Reference
Include dependency graph for test_crypto.cpp:

Go to the source code of this file.

Classes

class  DataChannelEpochTest
 
class  EpochTest
 

Functions

 TEST (Crypto, Hmac)
 
static openvpn::Frame::Context frame_ctx ()
 
openvpn::CryptoDCInstance::Ptr create_dctest_instance (bool use_epoch)
 
void test_datachannel_crypto (bool use_epoch)
 
 TEST (Crypto, TestEpochIterateKey)
 
 TEST (Crypto, EpochDeriveDataKeys)
 
 TEST (Crypto, AeadCipherMovable)
 
 TEST (Crypto, DcaeadDataV2)
 
 TEST (Crypto, DcaeadEpochData)
 
 TEST (Crypto, HkdfExpandTesta1)
 
 TEST (Crypto, HkdfExpandTesta2)
 
 TEST (Crypto, OvpnLabelExpandTest)
 
 TEST (Crypto, HkdfExpandTesta3)
 
 TEST_F (EpochTest, KeyGeneration)
 
 TEST_F (EpochTest, KeyRotation)
 
 TEST_F (EpochTest, KeyReceiveLookup)
 
 TEST_F (EpochTest, KeyOverflow)
 

Variables

static uint8_t testkey [20] = {0x0b, 0x00}
 
static uint8_t goodhash [20]
 
static const char * ipsumlorem
 

Function Documentation

◆ create_dctest_instance()

openvpn::CryptoDCInstance::Ptr create_dctest_instance ( bool  use_epoch)

Definition at line 94 of file test_crypto.cpp.

Here is the caller graph for this function:

◆ frame_ctx()

static openvpn::Frame::Context frame_ctx ( )
static

Definition at line 83 of file test_crypto.cpp.

Here is the caller graph for this function:

◆ TEST() [1/10]

TEST ( Crypto  ,
AeadCipherMovable   
)

Definition at line 308 of file test_crypto.cpp.

◆ TEST() [2/10]

TEST ( Crypto  ,
DcaeadDataV2   
)

Definition at line 351 of file test_crypto.cpp.

◆ TEST() [3/10]

TEST ( Crypto  ,
DcaeadEpochData   
)

Definition at line 356 of file test_crypto.cpp.

◆ TEST() [4/10]

TEST ( Crypto  ,
EpochDeriveDataKeys   
)

Definition at line 279 of file test_crypto.cpp.

◆ TEST() [5/10]

TEST ( Crypto  ,
HkdfExpandTesta1   
)

Definition at line 362 of file test_crypto.cpp.

◆ TEST() [6/10]

TEST ( Crypto  ,
HkdfExpandTesta2   
)

Definition at line 392 of file test_crypto.cpp.

◆ TEST() [7/10]

TEST ( Crypto  ,
HkdfExpandTesta3   
)

Definition at line 458 of file test_crypto.cpp.

◆ TEST() [8/10]

TEST ( Crypto  ,
Hmac   
)

Definition at line 39 of file test_crypto.cpp.

◆ TEST() [9/10]

TEST ( Crypto  ,
OvpnLabelExpandTest   
)

Definition at line 437 of file test_crypto.cpp.

◆ TEST() [10/10]

TEST ( Crypto  ,
TestEpochIterateKey   
)

Definition at line 218 of file test_crypto.cpp.

◆ test_datachannel_crypto()

void test_datachannel_crypto ( bool  use_epoch)

Definition at line 147 of file test_crypto.cpp.

Here is the caller graph for this function:

◆ TEST_F() [1/4]

TEST_F ( EpochTest  ,
KeyGeneration   
)

Definition at line 543 of file test_crypto.cpp.

◆ TEST_F() [2/4]

TEST_F ( EpochTest  ,
KeyOverflow   
)

Definition at line 648 of file test_crypto.cpp.

◆ TEST_F() [3/4]

TEST_F ( EpochTest  ,
KeyReceiveLookup   
)

Definition at line 595 of file test_crypto.cpp.

◆ TEST_F() [4/4]

TEST_F ( EpochTest  ,
KeyRotation   
)

Definition at line 553 of file test_crypto.cpp.

Variable Documentation

◆ goodhash

uint8_t goodhash[20]
static
Initial value:
= {
0x58, 0xea, 0x5a, 0xf0, 0x42, 0x94, 0xe9, 0x17,
0xed, 0x84, 0xb9, 0xf0, 0x83, 0x30, 0x23, 0xae,
0x8b, 0xa7, 0x7e, 0xb8
}

Definition at line 27 of file test_crypto.cpp.

◆ ipsumlorem

const char* ipsumlorem
static
Initial value:
= "Lorem ipsum dolor sit amet, consectetur "
"adipisici elit, sed eiusmod tempor incidunt "
"ut labore et dolore magna aliqua."

Definition at line 35 of file test_crypto.cpp.

◆ testkey

uint8_t testkey[20] = {0x0b, 0x00}
static

Definition at line 26 of file test_crypto.cpp.