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, epoch_derive_data_keys)
 
 TEST (crypto, aead_cipher_movable)
 
 TEST (crypto, dcaead_data_v2)
 
 TEST (crypto, dcaead_epoch_data)
 
 TEST (crypto, hkdf_expand_testa1)
 
 TEST (crypto, hkdf_expand_testa2)
 
 TEST (crypto, ovpn_label_expand_test)
 
 TEST (crypto, hkdf_expand_testa3)
 
 TEST_F (EpochTest, key_generation)
 
 TEST_F (EpochTest, key_rotation)
 
 TEST_F (EpochTest, key_receive_lookup)
 
 TEST_F (EpochTest, key_overflow)
 

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  ,
aead_cipher_movable   
)

Definition at line 308 of file test_crypto.cpp.

◆ TEST() [2/10]

TEST ( crypto  ,
dcaead_data_v2   
)

Definition at line 351 of file test_crypto.cpp.

◆ TEST() [3/10]

TEST ( crypto  ,
dcaead_epoch_data   
)

Definition at line 356 of file test_crypto.cpp.

◆ TEST() [4/10]

TEST ( crypto  ,
epoch_derive_data_keys   
)

Definition at line 279 of file test_crypto.cpp.

◆ TEST() [5/10]

TEST ( crypto  ,
hkdf_expand_testa1   
)

Definition at line 362 of file test_crypto.cpp.

◆ TEST() [6/10]

TEST ( crypto  ,
hkdf_expand_testa2   
)

Definition at line 392 of file test_crypto.cpp.

◆ TEST() [7/10]

TEST ( crypto  ,
hkdf_expand_testa3   
)

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  ,
ovpn_label_expand_test   
)

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  ,
key_generation   
)

Definition at line 543 of file test_crypto.cpp.

◆ TEST_F() [2/4]

TEST_F ( EpochTest  ,
key_overflow   
)

Definition at line 648 of file test_crypto.cpp.

◆ TEST_F() [3/4]

TEST_F ( EpochTest  ,
key_receive_lookup   
)

Definition at line 595 of file test_crypto.cpp.

◆ TEST_F() [4/4]

TEST_F ( EpochTest  ,
key_rotation   
)

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.