summaryrefslogtreecommitdiff
path: root/pith/smime.h
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2014-04-08 23:57:49 -0600
committerEduardo Chappa <chappa@washington.edu>2014-04-08 23:57:49 -0600
commit7d34d6b88a46a8cf950dc6305fa3c781edd9d4f7 (patch)
treeabcec7bc059644ca5ed9322e6bb1dda09743eccc /pith/smime.h
parent6a18937898292e97c15289e5ecd5d8f1c2205110 (diff)
downloadalpine-7d34d6b88a46a8cf950dc6305fa3c781edd9d4f7.tar.xz
* 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.
Diffstat (limited to 'pith/smime.h')
-rw-r--r--pith/smime.h12
1 files changed, 9 insertions, 3 deletions
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 <openssl/rand.h>
#include <openssl/err.h>
+#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 */