#include <gtest/gtest.h>
#include <openssl/bio.h>
#include <openssl/bytestring.h>
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/pkcs8.h>
#include <openssl/mem.h>
#include <openssl/span.h>
#include <openssl/stack.h>
#include <openssl/x509.h>
#include "../test/test_util.h"
Go to the source code of this file.
Functions | |
static void | ExpectPKCS12Parse (bssl::Span< const uint8_t > in, EVP_PKEY *expect_key, X509 *expect_cert, const std::vector< X509 * > &expect_ca_certs) |
std::string | GetTestData (const char *path) |
static bssl::UniquePtr< EVP_PKEY > | LoadPrivateKey (bssl::Span< const uint8_t > der) |
static bssl::UniquePtr< X509 > | LoadX509 (bssl::Span< const uint8_t > der) |
static bssl::UniquePtr< X509 > | MakeTestCert (EVP_PKEY *key) |
static bssl::UniquePtr< EVP_PKEY > | MakeTestKey () |
static bool | PKCS12CreateVector (std::vector< uint8_t > *out, EVP_PKEY *pkey, const std::vector< X509 * > &certs) |
static bssl::Span< const uint8_t > | StringToBytes (const std::string &str) |
TEST (PKCS12Test, Order) | |
TEST (PKCS12Test, RoundTrip) | |
TEST (PKCS12Test, TestEmptyPassword) | |
TEST (PKCS12Test, TestNoEncryption) | |
TEST (PKCS12Test, TestNSS) | |
TEST (PKCS12Test, TestNullPassword) | |
TEST (PKCS12Test, TestOpenSSL) | |
TEST (PKCS12Test, TestPBES2) | |
TEST (PKCS12Test, TestUnicode) | |
TEST (PKCS12Test, TestWindows) | |
TEST (PKCS12Test, TestWindowsCompat) | |
static void | TestCompat (bssl::Span< const uint8_t > der) |
static void | TestImpl (const char *name, bssl::Span< const uint8_t > der, const char *password, const char *friendly_name) |
static void | TestRoundTrip (const char *password, const char *name, bssl::Span< const uint8_t > key_der, bssl::Span< const uint8_t > cert_der, std::vector< bssl::Span< const uint8_t >> chain_der, int key_nid, int cert_nid, int iterations, int mac_iterations) |
Variables | |
static const char | kPassword [] = "foo" |
static const uint8_t | kTestCert [] |
static const uint8_t | kTestCert2 [] |
static const uint8_t | kTestKey [] |
static const char | kUnicodePassword [] = u8"Hello, 世界" |
|
static |
Definition at line 517 of file pkcs12_test.cc.
std::string GetTestData | ( | const char * | path | ) |
Definition at line 4454 of file crypto_test_data.cc.
Definition at line 300 of file pkcs12_test.cc.
Definition at line 295 of file pkcs12_test.cc.
Definition at line 469 of file pkcs12_test.cc.
|
static |
Definition at line 454 of file pkcs12_test.cc.
|
static |
Definition at line 488 of file pkcs12_test.cc.
Definition at line 39 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
Order | |||
) |
Definition at line 556 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
RoundTrip | |||
) |
Definition at line 387 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
TestEmptyPassword | |||
) |
Definition at line 143 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
TestNoEncryption | |||
) |
Definition at line 134 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
TestNSS | |||
) |
Definition at line 102 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
TestNullPassword | |||
) |
Definition at line 156 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
TestOpenSSL | |||
) |
Definition at line 95 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
TestPBES2 | |||
) |
Definition at line 117 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
TestUnicode | |||
) |
Definition at line 171 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
TestWindows | |||
) |
Definition at line 109 of file pkcs12_test.cc.
TEST | ( | PKCS12Test | , |
TestWindowsCompat | |||
) |
Definition at line 178 of file pkcs12_test.cc.
Definition at line 71 of file pkcs12_test.cc.
|
static |
Definition at line 44 of file pkcs12_test.cc.
|
static |
Definition at line 305 of file pkcs12_test.cc.
|
static |
Definition at line 34 of file pkcs12_test.cc.
Definition at line 199 of file pkcs12_test.cc.
Definition at line 241 of file pkcs12_test.cc.
Definition at line 184 of file pkcs12_test.cc.
|
static |
Definition at line 37 of file pkcs12_test.cc.