# HG changeset patch # User Olaf Wintermann # Date 1560683664 -7200 # Node ID aa49966e4e851a56cfe28e6d0ced60ad82af245b # Parent bbc66c72661aa1c4f8d680be7b602c5350492be7 add new session flags for properties encryption diff -r bbc66c72661a -r aa49966e4e85 dav/config.c --- a/dav/config.c Sat Jun 15 11:01:37 2019 +0200 +++ b/dav/config.c Sun Jun 16 13:14:24 2019 +0200 @@ -193,8 +193,10 @@ Repository *repo = calloc(1, sizeof(Repository)); repo->encrypt_name = false; repo->encrypt_content = false; + repo->encrypt_properties = false; repo->decrypt_name = false; repo->decrypt_content = true; + repo->decrypt_properties = false; repo->verification = true; repo->ssl_version = CURL_SSLVERSION_DEFAULT; repo->authmethods = CURLAUTH_BASIC; @@ -231,8 +233,10 @@ if(util_getboolean(value)) { repo->encrypt_name = true; repo->encrypt_content = true; + repo->encrypt_properties = true; repo->decrypt_name = true; repo->decrypt_content = true; + repo->decrypt_properties = true; } } else if(xstreq(key, "content-encryption")) { if(util_getboolean(value)) { @@ -576,12 +580,18 @@ if(repo->decrypt_name) { flags |= DAV_SESSION_DECRYPT_NAME; } + if(repo->decrypt_properties) { + flags |= DAV_SESSION_DECRYPT_PROPERTIES; + } if(repo->encrypt_content) { flags |= DAV_SESSION_ENCRYPT_CONTENT; } if(repo->encrypt_name) { flags |= DAV_SESSION_ENCRYPT_NAME; } + if(repo->encrypt_properties) { + flags |= DAV_SESSION_ENCRYPT_PROPERTIES; + } return flags; } diff -r bbc66c72661a -r aa49966e4e85 dav/config.h --- a/dav/config.h Sat Jun 15 11:01:37 2019 +0200 +++ b/dav/config.h Sun Jun 16 13:14:24 2019 +0200 @@ -63,8 +63,10 @@ bool verification; bool encrypt_content; bool encrypt_name; + bool encrypt_properties; bool decrypt_content; bool decrypt_name; + bool decrypt_properties; int ssl_version; unsigned long authmethods; }; diff -r bbc66c72661a -r aa49966e4e85 libidav/webdav.h --- a/libidav/webdav.h Sat Jun 15 11:01:37 2019 +0200 +++ b/libidav/webdav.h Sun Jun 16 13:14:24 2019 +0200 @@ -104,12 +104,14 @@ #define DAV_SESSION_ENCRYPT_CONTENT 0x0001 #define DAV_SESSION_ENCRYPT_NAME 0x0002 -#define DAV_SESSION_DECRYPT_CONTENT 0x0004 -#define DAV_SESSION_DECRYPT_NAME 0x0008 -#define DAV_SESSION_STORE_HASH 0x0010 +#define DAV_SESSION_ENCRYPT_PROPERTIES 0x0004 +#define DAV_SESSION_DECRYPT_CONTENT 0x0008 +#define DAV_SESSION_DECRYPT_NAME 0x0010 +#define DAV_SESSION_DECRYPT_PROPERTIES 0x0020 +#define DAV_SESSION_STORE_HASH 0x0040 -#define DAV_SESSION_CONTENT_ENCRYPTION 0x0005 -#define DAV_SESSION_FULL_ENCRYPTION 0x000f +#define DAV_SESSION_CONTENT_ENCRYPTION 0x0009 +#define DAV_SESSION_FULL_ENCRYPTION 0x003f #define DAV_NS "http://davutils.org/"