PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...
#include "dtoolbase.h"
#include "prcKeyRegistry.h"
#include "filename.h"
#include "pvector.h"
#include "panda_getopt.h"
#include "preprocess_argv.h"
#include <stdio.h>
#include <openssl/rsa.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/rand.h>
#include <openssl/bio.h>
Go to the source code of this file.
Typedefs | |
typedef pvector< KeyNumber > | KeyNumbers |
Functions | |
EVP_PKEY * | generate_key () |
Generates a new public and private key pair. More... | |
int | main (int argc, char **argv) |
void | output_c_string (std::ostream &out, const string &string_name, size_t index, BIO *mbio) |
Extracts the data written to the indicated memory bio and writes it to the indicated stream, formatting it to be compiled into a C or C++ program as a string. More... | |
void | output_ssl_errors () |
A convenience function that is itself a wrapper around the OpenSSL convenience function to output the recent OpenSSL errors. More... | |
void | usage () |
void | write_private_key (EVP_PKEY *pkey, Filename outfile, int n, time_t now, const char *pp) |
Generates a C++ program that can be used to sign a prc file with the indicated private key into the given output filename. More... | |
void | write_public_keys (Filename outfile) |
Writes the list of public keys stored in the PrcKeyRegistry to the indicated output filename as a compilable list of KeyDef entries, suitable for passing to PrcKeyRegistry::record_keys(). More... | |
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
All rights reserved.
All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."
Definition in file makePrcKey.cxx.
EVP_PKEY* generate_key | ( | ) |
Generates a new public and private key pair.
Definition at line 113 of file makePrcKey.cxx.
References output_ssl_errors().
void output_c_string | ( | std::ostream & | out, |
const string & | string_name, | ||
size_t | index, | ||
BIO * | mbio | ||
) |
Extracts the data written to the indicated memory bio and writes it to the indicated stream, formatting it to be compiled into a C or C++ program as a string.
Definition at line 75 of file makePrcKey.cxx.
Referenced by write_private_key().
void output_ssl_errors | ( | ) |
A convenience function that is itself a wrapper around the OpenSSL convenience function to output the recent OpenSSL errors.
This function sends the error string to cerr.
Definition at line 50 of file makePrcKey.cxx.
Referenced by generate_key(), and write_private_key().
void write_private_key | ( | EVP_PKEY * | pkey, |
Filename | outfile, | ||
int | n, | ||
time_t | now, | ||
const char * | pp | ||
) |
Generates a C++ program that can be used to sign a prc file with the indicated private key into the given output filename.
Definition at line 207 of file makePrcKey.cxx.
References output_c_string(), output_ssl_errors(), and Filename::set_text().
void write_public_keys | ( | Filename | outfile | ) |
Writes the list of public keys stored in the PrcKeyRegistry to the indicated output filename as a compilable list of KeyDef entries, suitable for passing to PrcKeyRegistry::record_keys().
Definition at line 142 of file makePrcKey.cxx.
References Filename::set_text().