From 7d34d6b88a46a8cf950dc6305fa3c781edd9d4f7 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Tue, 8 Apr 2014 23:57:49 -0600 Subject: * Fixes bug in 2.19.8 that would make Alpine fail to build in Windows. * S/MIME configuration screen would deinitialize smime, not allowing it to send encrypted or signed messages. * Add documentation for /loser option in definition of external servers. * crashing bug in certificate management screen due to a BIO_free() call of memory that had not been allocated. * When the password file is decrypted, smime is inited. If smime is inited before the .pinerc is read, some values might not be correctly set. * When a password file exists, and S/MIME is enabled, encrypt it by either using an existing key/certificate pair. The key is saved separately in ~/.alpine-smime/.pwd, or in the directory specified by the -pwdcertdir command line option. --- pith/smime.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'pith/smime.h') diff --git a/pith/smime.h b/pith/smime.h index a8ca8dd2..3d65d924 100644 --- a/pith/smime.h +++ b/pith/smime.h @@ -27,14 +27,17 @@ #include #include +#ifdef PASSFILE +#define DF_PASSWORD_DIR ".alpine-smime/.pwd" +#endif #define OUR_PKCS7_ENCLOSURE_SUBTYPE "x-pkcs7-enclosure" /* exported protoypes */ int smime_validate_cert(X509 *cert, long *error); -int encrypt_file(char *fp, char *text); -char *decrypt_file(char *fp, int *rv); +int encrypt_file(char *fp, char *text, PERSONAL_CERT *pc); +char *decrypt_file(char *fp, int *rv, PERSONAL_CERT *pc); int is_pkcs7_body(BODY *b); int fiddle_smime_message(BODY *b, long msgno); int encrypt_outgoing_message(METAENV *header, BODY **bodyP); @@ -45,6 +48,7 @@ PERSONAL_CERT *find_certificate_matching_recip_info(PKCS7_RECIP_INFO *ri); PERSONAL_CERT *get_personal_certs(char *path); void smime_init(void); void smime_deinit(void); +void smime_reinit(void); void renew_store(void); void renew_cert_data(CertList **data, WhichCerts ctype); BIO *print_private_key_information(char *email, int itype); @@ -61,7 +65,9 @@ int copy_publiccert_container_to_keychain(void); int copy_publiccert_keychain_to_container(void); #endif /* APPLEKEYCHAIN */ int import_certificate(WhichCerts); - +#ifdef PASSFILE +void setup_pwdcert(void); +#endif /* PASSFILE */ #endif /* PITH_SMIME_INCLUDED */ #endif /* SMIME */ -- cgit v1.2.3-54-g00ecf