ne_props.h | ne_props.h | |||
---|---|---|---|---|
/* | /* | |||
WebDAV Properties manipulation | WebDAV Properties manipulation | |||
Copyright (C) 1999-2002, Joe Orton <joe@manyfish.co.uk> | Copyright (C) 1999-2004, Joe Orton <joe@manyfish.co.uk> | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Library General Public | modify it under the terms of the GNU Library General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | Library General Public License for more details. | |||
skipping to change at line 141 | skipping to change at line 141 | |||
* A single proppatch request may include any number of individual | * A single proppatch request may include any number of individual | |||
* "set" and "remove" operations, and is defined to have | * "set" and "remove" operations, and is defined to have | |||
* "all-or-nothing" semantics, so either all the operations succeed, | * "all-or-nothing" semantics, so either all the operations succeed, | |||
* or none do. */ | * or none do. */ | |||
/* A proppatch operation may either set a property to have a new | /* A proppatch operation may either set a property to have a new | |||
* value, in which case 'type' must be ne_propset, and 'value' must be | * value, in which case 'type' must be ne_propset, and 'value' must be | |||
* non-NULL; or it can remove a property; in which case 'type' must be | * non-NULL; or it can remove a property; in which case 'type' must be | |||
* ne_propremove, and 'value' is ignored. In both cases, 'name' must | * ne_propremove, and 'value' is ignored. In both cases, 'name' must | |||
* be set to the name of the property to alter. */ | * be set to the name of the property to alter. */ | |||
enum ne_proppatch_optype { | ||||
ne_propset, | ||||
ne_propremove | ||||
}; | ||||
typedef struct { | typedef struct { | |||
const ne_propname *name; | const ne_propname *name; | |||
enum { | enum ne_proppatch_optype type; | |||
ne_propset, | ||||
ne_propremove | ||||
} type; | ||||
const char *value; | const char *value; | |||
} ne_proppatch_operation; | } ne_proppatch_operation; | |||
/* Execute a set of property operations 'ops' on 'path'. 'ops' is an | /* Execute a set of property operations 'ops' on 'path'. 'ops' is an | |||
* array terminated by an operation with a NULL 'name' field. Returns | * array terminated by an operation with a NULL 'name' field. Returns | |||
* NE_*. */ | * NE_*. */ | |||
int ne_proppatch(ne_session *sess, const char *path, | int ne_proppatch(ne_session *sess, const char *path, | |||
const ne_proppatch_operation *ops); | const ne_proppatch_operation *ops); | |||
/* Retrieve property names for the resources at 'path'. 'results' | /* Retrieve property names for the resources at 'path'. 'results' | |||
End of changes. 3 change blocks. | ||||
5 lines changed or deleted | 6 lines changed or added | |||
ne_ssl.h | ne_ssl.h | |||
---|---|---|---|---|
/* | /* | |||
SSL/TLS abstraction layer for neon | SSL/TLS abstraction layer for neon | |||
Copyright (C) 2003, Joe Orton <joe@manyfish.co.uk> | Copyright (C) 2003-2004, Joe Orton <joe@manyfish.co.uk> | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Library General Public | modify it under the terms of the GNU Library General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | Library General Public License for more details. | |||
skipping to change at line 37 | skipping to change at line 37 | |||
#include "ne_defs.h" | #include "ne_defs.h" | |||
BEGIN_NEON_DECLS | BEGIN_NEON_DECLS | |||
/* A "distinguished name"; a unique name for some entity. */ | /* A "distinguished name"; a unique name for some entity. */ | |||
typedef struct ne_ssl_dname_s ne_ssl_dname; | typedef struct ne_ssl_dname_s ne_ssl_dname; | |||
/* Returns a single-line string representation of a distinguished | /* Returns a single-line string representation of a distinguished | |||
* name, intended to be human-readable (e.g. "Acme Ltd., Norfolk, | * name, intended to be human-readable (e.g. "Acme Ltd., Norfolk, | |||
* GB"). Return value is malloc-allocated and must be free'd by the | * GB"). Return value is a UTF-8-encoded malloc-allocated string and | |||
* caller. */ | * must be free'd by the caller. */ | |||
char *ne_ssl_readable_dname(const ne_ssl_dname *dn); | char *ne_ssl_readable_dname(const ne_ssl_dname *dn); | |||
/* Returns zero if 'dn1' and 'dn2' refer to same name, or non-zero if | /* Returns zero if 'dn1' and 'dn2' refer to same name, or non-zero if | |||
* they are different. */ | * they are different. */ | |||
int ne_ssl_dname_cmp(const ne_ssl_dname *dn1, const ne_ssl_dname *dn2); | int ne_ssl_dname_cmp(const ne_ssl_dname *dn1, const ne_ssl_dname *dn2); | |||
/* An SSL certificate. */ | /* An SSL certificate. */ | |||
typedef struct ne_ssl_certificate_s ne_ssl_certificate; | typedef struct ne_ssl_certificate_s ne_ssl_certificate; | |||
/* Read a certificate from a file in PEM format; returns NULL if the | /* Read a certificate from a file in PEM format; returns NULL if the | |||
skipping to change at line 84 | skipping to change at line 84 | |||
const ne_ssl_certificate *ne_ssl_cert_signedby(const ne_ssl_certificate *ce rt); | const ne_ssl_certificate *ne_ssl_cert_signedby(const ne_ssl_certificate *ce rt); | |||
/* Returns the distinguished name of the certificate issuer. */ | /* Returns the distinguished name of the certificate issuer. */ | |||
const ne_ssl_dname *ne_ssl_cert_issuer(const ne_ssl_certificate *cert); | const ne_ssl_dname *ne_ssl_cert_issuer(const ne_ssl_certificate *cert); | |||
/* Returns the distinguished name of the certificate subject. */ | /* Returns the distinguished name of the certificate subject. */ | |||
const ne_ssl_dname *ne_ssl_cert_subject(const ne_ssl_certificate *cert); | const ne_ssl_dname *ne_ssl_cert_subject(const ne_ssl_certificate *cert); | |||
#define NE_SSL_DIGESTLEN (60) | #define NE_SSL_DIGESTLEN (60) | |||
/* Calculate the digest ("fingerprint") and format it as a | /* Calculate the certificate digest ("fingerprint") and format it as a | |||
* NUL-terminated hex string in 'digest', of the form "aa:bb:...:ff". | * NUL-terminated hex string in 'digest', of the form "aa:bb:...:ff". | |||
* Returns zero on success or non-zero if there was an internal error | * Returns zero on success or non-zero if there was an internal error | |||
* whilst calculating the digest. 'digest' must be at least | * whilst calculating the digest. 'digest' must be at least | |||
* NE_SSL_DIGESTLEN bytes in length. */ | * NE_SSL_DIGESTLEN bytes in length. */ | |||
int ne_ssl_cert_digest(const ne_ssl_certificate *cert, char *digest); | int ne_ssl_cert_digest(const ne_ssl_certificate *cert, char *digest); | |||
#define NE_SSL_VDATELEN (30) | #define NE_SSL_VDATELEN (30) | |||
/* Copy the validity dates into buffers 'from' and 'until' as | /* Copy the validity dates into buffers 'from' and 'until' as | |||
* NUL-terminated human-readable strings. The buffers must be at | * NUL-terminated human-readable strings. The buffers must be at | |||
skipping to change at line 116 | skipping to change at line 116 | |||
/* A client certificate (and private key). */ | /* A client certificate (and private key). */ | |||
typedef struct ne_ssl_client_cert_s ne_ssl_client_cert; | typedef struct ne_ssl_client_cert_s ne_ssl_client_cert; | |||
/* Read a client certificate and private key from a PKCS12 file; | /* Read a client certificate and private key from a PKCS12 file; | |||
* returns NULL if the file could not be parsed. If the client cert | * returns NULL if the file could not be parsed. If the client cert | |||
* is encrypted, it must be decrypted before use. */ | * is encrypted, it must be decrypted before use. */ | |||
ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename); | ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename); | |||
/* Returns the "friendly name" given for the client cert, or NULL if | /* Returns the "friendly name" given for the client cert, or NULL if | |||
* none given. (this can be called before the client cert has been | * none given. This can be called before or after the client cert has | |||
* decrypted). */ | * been decrypted. Returns a NUL-terminated string. */ | |||
const char *ne_ssl_clicert_name(ne_ssl_client_cert *ccert); | const char *ne_ssl_clicert_name(ne_ssl_client_cert *ccert); | |||
/* Returns non-zero if client cert is encrypted. */ | /* Returns non-zero if client cert is encrypted. */ | |||
int ne_ssl_clicert_encrypted(const ne_ssl_client_cert *ccert); | int ne_ssl_clicert_encrypted(const ne_ssl_client_cert *ccert); | |||
/* Decrypt the encrypted client cert using given password. Returns | /* Decrypt the encrypted client cert using given password. Returns | |||
* non-zero on failure, in which case, the function can be called | * non-zero on failure, in which case, the function can be called | |||
* again with a different password. For a ccert on which _encrypted() | * again with a different password. For a ccert on which _encrypted() | |||
* returns 0, calling _decrypt results in undefined behaviour. */ | * returns 0, calling _decrypt results in undefined behaviour. */ | |||
int ne_ssl_clicert_decrypt(ne_ssl_client_cert *ccert, const char *password) ; | int ne_ssl_clicert_decrypt(ne_ssl_client_cert *ccert, const char *password) ; | |||
End of changes. 4 change blocks. | ||||
6 lines changed or deleted | 6 lines changed or added | |||