"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/ne_openssl.c" between
neon-0.31.1.tar.gz and neon-0.31.2.tar.gz

About: neon is an HTTP and WebDAV client library, with a C interface.

ne_openssl.c  (neon-0.31.1):ne_openssl.c  (neon-0.31.2)
skipping to change at line 71 skipping to change at line 71
#endif #endif
/* Second argument for d2i_X509() changed type in 0.9.8. */ /* Second argument for d2i_X509() changed type in 0.9.8. */
#if OPENSSL_VERSION_NUMBER < 0x0090800fL #if OPENSSL_VERSION_NUMBER < 0x0090800fL
typedef unsigned char ne_d2i_uchar; typedef unsigned char ne_d2i_uchar;
#else #else
typedef const unsigned char ne_d2i_uchar; typedef const unsigned char ne_d2i_uchar;
#endif #endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L #if OPENSSL_VERSION_NUMBER < 0x10100000L
#define X509_get0_notBefore X509_get_notBefore
#define X509_get0_notAfter X509_get_notAfter
#define X509_up_ref(x) x->references++ #define X509_up_ref(x) x->references++
#define EVP_PKEY_up_ref(x) x->references++ #define EVP_PKEY_up_ref(x) x->references++
#define EVP_MD_CTX_new() ne_calloc(sizeof(EVP_MD_CTX)) #define EVP_MD_CTX_new() ne_calloc(sizeof(EVP_MD_CTX))
#define EVP_MD_CTX_free(ctx) ne_free(ctx) #define EVP_MD_CTX_free(ctx) ne_free(ctx)
#define EVP_MD_CTX_reset EVP_MD_CTX_cleanup #define EVP_MD_CTX_reset EVP_MD_CTX_cleanup
#define EVP_PKEY_get0_RSA(evp) (evp->pkey.rsa) #define EVP_PKEY_get0_RSA(evp) (evp->pkey.rsa)
#endif #endif
struct ne_ssl_dname_s { struct ne_ssl_dname_s {
X509_NAME *dn; X509_NAME *dn;
skipping to change at line 233 skipping to change at line 235
return mktime(&tm) - timezone; return mktime(&tm) - timezone;
#else #else
return mktime(&tm); return mktime(&tm);
#endif #endif
} }
void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert, void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert,
time_t *from, time_t *until) time_t *from, time_t *until)
{ {
if (from) { if (from) {
*from = asn1time_to_timet(X509_get_notBefore(cert->subject)); *from = asn1time_to_timet(X509_get0_notBefore(cert->subject));
} }
if (until) { if (until) {
*until = asn1time_to_timet(X509_get_notAfter(cert->subject)); *until = asn1time_to_timet(X509_get0_notAfter(cert->subject));
} }
} }
/* Check certificate identity. Returns zero if identity matches; 1 if /* Check certificate identity. Returns zero if identity matches; 1 if
* identity does not match, or <0 if the certificate had no identity. * identity does not match, or <0 if the certificate had no identity.
* If 'identity' is non-NULL, store the malloc-allocated identity in * If 'identity' is non-NULL, store the malloc-allocated identity in
* *identity. Logic specified by RFC 2818 and RFC 3280. */ * *identity. Logic specified by RFC 2818 and RFC 3280. */
static int check_identity(const ne_uri *server, X509 *cert, char **identity) static int check_identity(const ne_uri *server, X509 *cert, char **identity)
{ {
STACK_OF(GENERAL_NAME) *names; STACK_OF(GENERAL_NAME) *names;
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)