Go to the documentation of this file.
26 #include <sys/types.h>
27 #if defined(OPENSSL_WINDOWS)
39 #include "../crypto/internal.h"
46 "Dump the key and contents of the given file to stdout",
54 std::map<std::string, std::string> args_map;
57 args_map[
"-dump"].
empty()) {
69 if (fstat(fd.
get(), &st)) {
73 const size_t size = st.st_size;
84 fprintf(
stderr,
"Unexpected EOF\n");
90 printf(
"Enter password: ");
95 while (off <
sizeof(password) - 1) {
98 sizeof(password) - 1 - off)) {
109 char *newline =
reinterpret_cast<char *
>(
OPENSSL_memchr(password,
'\n', off));
110 if (newline == NULL) {
122 fprintf(
stderr,
"Failed to parse PKCS#12 data:\n");
126 bssl::UniquePtr<EVP_PKEY> key_owned(
key);
bool ParseKeyValueArguments(std::map< std::string, std::string > *out_args, const std::vector< std::string > &args, const struct argument *templates)
#define PKCS12_get_key_and_certs
_Use_decl_annotations_ int __cdecl printf(const char *_Format,...)
#define ERR_print_errors_fp
static void * OPENSSL_memchr(const void *s, int c, size_t n)
bool ReadFromFD(int fd, size_t *out_bytes_read, void *out, size_t num)
int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u)
def c_str(s, encoding='ascii')
std::unique_ptr< T, DefaultDeleteChar > UniquePtr
void PrintUsage(const struct argument *templates)
ScopedFD OpenFD(const char *path, int flags)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:43