Classes | Functions | Variables
bio_test.cc File Reference
#include <algorithm>
#include <string>
#include <gtest/gtest.h>
#include <openssl/bio.h>
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/mem.h>
#include "../internal.h"
#include "../test/test_util.h"
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>
Include dependency graph for bio_test.cc:

Go to the source code of this file.

Classes

struct  ASN1TestParam
 
class  BIOASN1Test
 
class  BIOPairTest
 
class  ScopedSocket
 

Functions

static int closesocket (int sock)
 
 INSTANTIATE_TEST_SUITE_P (All, BIOASN1Test, testing::ValuesIn(kASN1TestParams))
 
 INSTANTIATE_TEST_SUITE_P (All, BIOPairTest, testing::Values(false, true))
 
static std::string LastSocketError ()
 
 TEST (BIOTest, Printf)
 
 TEST (BIOTest, SocketConnect)
 
 TEST_P (BIOASN1Test, ReadASN1)
 
 TEST_P (BIOPairTest, TestPair)
 

Variables

struct ASN1TestParam kASN1TestParams []
 
static const size_t kLargeASN1PayloadLen = 8000
 

Function Documentation

◆ closesocket()

static int closesocket ( int  sock)
static

Definition at line 46 of file bio_test.cc.

◆ INSTANTIATE_TEST_SUITE_P() [1/2]

INSTANTIATE_TEST_SUITE_P ( All  ,
BIOASN1Test  ,
testing::ValuesIn(kASN1TestParams  
)

◆ INSTANTIATE_TEST_SUITE_P() [2/2]

INSTANTIATE_TEST_SUITE_P ( All  ,
BIOPairTest  ,
testing::Values(false, true  
)

◆ LastSocketError()

static std::string LastSocketError ( )
static

Definition at line 47 of file bio_test.cc.

◆ TEST() [1/2]

TEST ( BIOTest  ,
Printf   
)

Definition at line 130 of file bio_test.cc.

◆ TEST() [2/2]

TEST ( BIOTest  ,
SocketConnect   
)

Definition at line 67 of file bio_test.cc.

◆ TEST_P() [1/2]

TEST_P ( BIOASN1Test  ,
ReadASN1   
)

Definition at line 201 of file bio_test.cc.

◆ TEST_P() [2/2]

TEST_P ( BIOPairTest  ,
TestPair   
)

Definition at line 228 of file bio_test.cc.

Variable Documentation

◆ kASN1TestParams

struct ASN1TestParam kASN1TestParams[]
Initial value:
= {
{true, {0x30, 2, 1, 2, 0, 0}, 0, 4, 100},
{false , {0x30, 3, 1, 2}, 0, 0, 100},
{false , {0x30, 0x81, 1, 1}, 0, 0, 100},
{false , {0x30, 0x82, 0, 1, 1}, 0, 0, 100},
{true,
{0x30, 0x82, kLargeASN1PayloadLen >> 8, kLargeASN1PayloadLen & 0xff},
{false ,
{0x30, 0x82, kLargeASN1PayloadLen >> 8, kLargeASN1PayloadLen & 0xff},
{true,
{0x30, 0x80},
{false ,
{0x30, 0x80},
}

◆ kLargeASN1PayloadLen

const size_t kLargeASN1PayloadLen = 8000
static

Definition at line 157 of file bio_test.cc.

false
#define false
Definition: setup_once.h:323
kLargeASN1PayloadLen
static const size_t kLargeASN1PayloadLen
Definition: bio_test.cc:157


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:04