From: Fabian Keil Date: Tue, 19 Nov 2019 13:31:26 +0000 (+0100) Subject: Move two typedefs from project.h to ssl.c X-Git-Tag: v_3_0_29~564 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=144ed390b637d609d4544eca8e99f56043192928;hp=2b177e993a6a466b82afd020eaa4666b6e25f157 Move two typedefs from project.h to ssl.c --- diff --git a/project.h b/project.h index 7cd6e500..cd545b7a 100644 --- a/project.h +++ b/project.h @@ -347,34 +347,6 @@ struct http_request #ifdef FEATURE_HTTPS_FILTERING -/* - * Properties of cert for generating - */ -typedef struct{ - char *issuer_crt; /* filename of the issuer certificate */ - char *subject_key; /* filename of the subject key file */ - char *issuer_key; /* filename of the issuer key file */ - const char *subject_pwd; /* password for the subject key file */ - const char *issuer_pwd; /* password for the issuer key file */ - char *output_file; /* where to store the constructed key file */ - const char *subject_name; /* subject name for certificate */ - char issuer_name[ISSUER_NAME_BUF_SIZE]; /* issuer name for certificate */ - const char *not_before; /* validity period not before */ - const char *not_after; /* validity period not after */ - const char *serial; /* serial number string */ - int is_ca; /* is a CA certificate */ - int max_pathlen; /* maximum CA path length */ -} cert_options; - -/* - * Properties of key for generating - */ -typedef struct{ - mbedtls_pk_type_t type; /* type of key to generate */ - int rsa_keysize; /* length of key in bits */ - char *key_file_path; /* filename of the key file */ -} key_options; - /* * Struct for linked list containing certificates */ diff --git a/ssl.c b/ssl.c index 4585ce13..6bf51c59 100644 --- a/ssl.c +++ b/ssl.c @@ -80,6 +80,33 @@ #define CERT_SUBJECT_PASSWORD "" #define CERT_INFO_PREFIX "" +/* + * Properties of cert for generating + */ +typedef struct { + char *issuer_crt; /* filename of the issuer certificate */ + char *subject_key; /* filename of the subject key file */ + char *issuer_key; /* filename of the issuer key file */ + const char *subject_pwd; /* password for the subject key file */ + const char *issuer_pwd; /* password for the issuer key file */ + char *output_file; /* where to store the constructed key file */ + const char *subject_name; /* subject name for certificate */ + char issuer_name[ISSUER_NAME_BUF_SIZE]; /* issuer name for certificate */ + const char *not_before; /* validity period not before */ + const char *not_after; /* validity period not after */ + const char *serial; /* serial number string */ + int is_ca; /* is a CA certificate */ + int max_pathlen; /* maximum CA path length */ +} cert_options; + +/* + * Properties of key for generating + */ +typedef struct { + mbedtls_pk_type_t type; /* type of key to generate */ + int rsa_keysize; /* length of key in bits */ + char *key_file_path; /* filename of the key file */ +} key_options; extern int generate_webpage_certificate(struct client_state * csp); static char * make_certs_path(const char * conf_dir, const char * file_name, const char * suffix);