webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Functions | Variables
sslidentity_unittest.cc File Reference
#include <memory>
#include <string>
#include "webrtc/base/fakesslidentity.h"
#include "webrtc/base/gunit.h"
#include "webrtc/base/helpers.h"
#include "webrtc/base/ssladapter.h"
#include "webrtc/base/sslfingerprint.h"
#include "webrtc/base/sslidentity.h"
#include "webrtc/base/stringutils.h"

Classes

struct  IdentityAndInfo
 
class  SSLIdentityTest
 
class  SSLIdentityExpirationTest
 

Functions

IdentityAndInfo CreateFakeIdentityAndInfoFromDers (const std::vector< std::string > &ders)
 
 TEST_F (SSLIdentityTest, FixedDigestSHA1)
 
 TEST_F (SSLIdentityTest, FixedDigestSHA224)
 
 TEST_F (SSLIdentityTest, FixedDigestSHA256)
 
 TEST_F (SSLIdentityTest, FixedDigestSHA384)
 
 TEST_F (SSLIdentityTest, FixedDigestSHA512)
 
 TEST_F (SSLIdentityTest, DigestSHA224)
 
 TEST_F (SSLIdentityTest, DigestSHA256)
 
 TEST_F (SSLIdentityTest, DigestSHA384)
 
 TEST_F (SSLIdentityTest, DigestSHA512)
 
 TEST_F (SSLIdentityTest, IdentityComparison)
 
 TEST_F (SSLIdentityTest, FromPEMStringsRSA)
 
 TEST_F (SSLIdentityTest, FromPEMStringsEC)
 
 TEST_F (SSLIdentityTest, CloneIdentityRSA)
 
 TEST_F (SSLIdentityTest, CloneIdentityECDSA)
 
 TEST_F (SSLIdentityTest, PemDerConversion)
 
 TEST_F (SSLIdentityTest, GetSignatureDigestAlgorithm)
 
 TEST_F (SSLIdentityTest, SSLCertificateGetStatsRSA)
 
 TEST_F (SSLIdentityTest, SSLCertificateGetStatsECDSA)
 
 TEST_F (SSLIdentityTest, SSLCertificateGetStatsWithChain)
 
 TEST_F (SSLIdentityExpirationTest, TestASN1TimeToSec)
 
 TEST_F (SSLIdentityExpirationTest, TestExpireTime)
 

Variables

const char kTestCertificate []
 
const unsigned char kTestCertSha1 []
 
const unsigned char kTestCertSha224 []
 
const unsigned char kTestCertSha256 []
 
const unsigned char kTestCertSha384 []
 
const unsigned char kTestCertSha512 []
 

Function Documentation

◆ CreateFakeIdentityAndInfoFromDers()

IdentityAndInfo CreateFakeIdentityAndInfoFromDers ( const std::vector< std::string > &  ders)

◆ TEST_F() [1/21]

TEST_F ( SSLIdentityTest  ,
FixedDigestSHA1   
)

◆ TEST_F() [2/21]

TEST_F ( SSLIdentityTest  ,
FixedDigestSHA224   
)

◆ TEST_F() [3/21]

TEST_F ( SSLIdentityTest  ,
FixedDigestSHA256   
)

◆ TEST_F() [4/21]

TEST_F ( SSLIdentityTest  ,
FixedDigestSHA384   
)

◆ TEST_F() [5/21]

TEST_F ( SSLIdentityTest  ,
FixedDigestSHA512   
)

◆ TEST_F() [6/21]

TEST_F ( SSLIdentityTest  ,
DigestSHA224   
)

◆ TEST_F() [7/21]

TEST_F ( SSLIdentityTest  ,
DigestSHA256   
)

◆ TEST_F() [8/21]

TEST_F ( SSLIdentityTest  ,
DigestSHA384   
)

◆ TEST_F() [9/21]

TEST_F ( SSLIdentityTest  ,
DigestSHA512   
)

◆ TEST_F() [10/21]

TEST_F ( SSLIdentityTest  ,
IdentityComparison   
)

◆ TEST_F() [11/21]

TEST_F ( SSLIdentityTest  ,
FromPEMStringsRSA   
)

◆ TEST_F() [12/21]

TEST_F ( SSLIdentityTest  ,
FromPEMStringsEC   
)

◆ TEST_F() [13/21]

TEST_F ( SSLIdentityTest  ,
CloneIdentityRSA   
)

◆ TEST_F() [14/21]

TEST_F ( SSLIdentityTest  ,
CloneIdentityECDSA   
)

◆ TEST_F() [15/21]

TEST_F ( SSLIdentityTest  ,
PemDerConversion   
)

◆ TEST_F() [16/21]

TEST_F ( SSLIdentityTest  ,
GetSignatureDigestAlgorithm   
)

◆ TEST_F() [17/21]

TEST_F ( SSLIdentityTest  ,
SSLCertificateGetStatsRSA   
)

◆ TEST_F() [18/21]

TEST_F ( SSLIdentityTest  ,
SSLCertificateGetStatsECDSA   
)

◆ TEST_F() [19/21]

TEST_F ( SSLIdentityTest  ,
SSLCertificateGetStatsWithChain   
)

◆ TEST_F() [20/21]

TEST_F ( SSLIdentityExpirationTest  ,
TestASN1TimeToSec   
)

◆ TEST_F() [21/21]

TEST_F ( SSLIdentityExpirationTest  ,
TestExpireTime   
)

Variable Documentation

◆ kTestCertificate

const char kTestCertificate[]
Initial value:
= "-----BEGIN CERTIFICATE-----\n"
"MIIB6TCCAVICAQYwDQYJKoZIhvcNAQEEBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV\n"
"BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD\n"
"VQQDExJUZXN0IENBICgxMDI0IGJpdCkwHhcNMDAxMDE2MjIzMTAzWhcNMDMwMTE0\n"
"MjIzMTAzWjBjMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEaMBgG\n"
"A1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxIzAhBgNVBAMTGlNlcnZlciB0ZXN0IGNl\n"
"cnQgKDUxMiBiaXQpMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ+zw4Qnlf8SMVIP\n"
"Fe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVDTGiXav6ooKXfX3j/7tdkuD8Ey2//\n"
"Kv7+ue0CAwEAATANBgkqhkiG9w0BAQQFAAOBgQCT0grFQeZaqYb5EYfk20XixZV4\n"
"GmyAbXMftG1Eo7qGiMhYzRwGNWxEYojf5PZkYZXvSqZ/ZXHXa4g59jK/rJNnaVGM\n"
"k+xIX8mxQvlV0n5O9PIha5BX5teZnkHKgL8aKKLKW1BK7YTngsfSzzaeame5iKfz\n"
"itAE+OjGF+PFKbwX8Q==\n"
"-----END CERTIFICATE-----\n"

◆ kTestCertSha1

const unsigned char kTestCertSha1[]
Initial value:
= {
0xA6, 0xC8, 0x59, 0xEA, 0xC3, 0x7E, 0x6D, 0x33,
0xCF, 0xE2, 0x69, 0x9D, 0x74, 0xE6, 0xF6, 0x8A,
0x9E, 0x47, 0xA7, 0xCA}

◆ kTestCertSha224

const unsigned char kTestCertSha224[]
Initial value:
= {
0xd4, 0xce, 0xc6, 0xcf, 0x28, 0xcb, 0xe9, 0x77,
0x38, 0x36, 0xcf, 0xb1, 0x3b, 0x4a, 0xd7, 0xbd,
0xae, 0x24, 0x21, 0x08, 0xcf, 0x6a, 0x44, 0x0d,
0x3f, 0x94, 0x2a, 0x5b}

◆ kTestCertSha256

const unsigned char kTestCertSha256[]
Initial value:
= {
0x41, 0x6b, 0xb4, 0x93, 0x47, 0x79, 0x77, 0x24,
0x77, 0x0b, 0x8b, 0x2e, 0xa6, 0x2b, 0xe0, 0xf9,
0x0a, 0xed, 0x1f, 0x31, 0xa6, 0xf7, 0x5c, 0xa1,
0x5a, 0xc4, 0xb0, 0xa2, 0xa4, 0x78, 0xb9, 0x76}

◆ kTestCertSha384

const unsigned char kTestCertSha384[]
Initial value:
= {
0x42, 0x31, 0x9a, 0x79, 0x1d, 0xd6, 0x08, 0xbf,
0x3b, 0xba, 0x36, 0xd8, 0x37, 0x4a, 0x9a, 0x75,
0xd3, 0x25, 0x6e, 0x28, 0x92, 0xbe, 0x06, 0xb7,
0xc5, 0xa0, 0x83, 0xe3, 0x86, 0xb1, 0x03, 0xfc,
0x64, 0x47, 0xd6, 0xd8, 0xaa, 0xd9, 0x36, 0x60,
0x04, 0xcc, 0xbe, 0x7d, 0x6a, 0xe8, 0x34, 0x49}

◆ kTestCertSha512

const unsigned char kTestCertSha512[]
Initial value:
= {
0x51, 0x1d, 0xec, 0x02, 0x3d, 0x51, 0x45, 0xd3,
0xd8, 0x1d, 0xa4, 0x9d, 0x43, 0xc9, 0xee, 0x32,
0x6f, 0x4f, 0x37, 0xee, 0xab, 0x3f, 0x25, 0xdf,
0x72, 0xfc, 0x61, 0x1a, 0xd5, 0x92, 0xff, 0x6b,
0x28, 0x71, 0x58, 0xb3, 0xe1, 0x8a, 0x18, 0xcf,
0x61, 0x33, 0x0e, 0x14, 0xc3, 0x04, 0xaa, 0x07,
0xf6, 0xa5, 0xda, 0xdc, 0x42, 0x42, 0x22, 0x35,
0xce, 0x26, 0x58, 0x4a, 0x33, 0x6d, 0xbc, 0xb6}