You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.0 KiB

  1. --- a/src/ne_openssl.c
  2. +++ b/src/ne_openssl.c
  3. @@ -35,6 +35,10 @@
  4. #include <openssl/x509v3.h>
  5. #include <openssl/rand.h>
  6. #include <openssl/opensslv.h>
  7. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  8. +#define X509_get0_notBefore X509_get_notBefore
  9. +#define X509_get0_notAfter X509_get_notAfter
  10. +#endif
  11. #ifdef NE_HAVE_TS_SSL
  12. #include <stdlib.h> /* for abort() */
  13. @@ -226,10 +230,10 @@ void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert,
  14. time_t *from, time_t *until)
  15. {
  16. if (from) {
  17. - *from = asn1time_to_timet(X509_get_notBefore(cert->subject));
  18. + *from = asn1time_to_timet(X509_get0_notBefore(cert->subject));
  19. }
  20. if (until) {
  21. - *until = asn1time_to_timet(X509_get_notAfter(cert->subject));
  22. + *until = asn1time_to_timet(X509_get0_notAfter(cert->subject));
  23. }
  24. }
  25. --- a/src/ne_socket.c
  26. +++ b/src/ne_socket.c
  27. @@ -27,7 +27,7 @@
  28. #include "config.h"
  29. #include <sys/types.h>
  30. -#ifdef HAVE_SYS_UIO_h
  31. +#ifdef HAVE_SYS_UIO_H
  32. #include <sys/uio.h> /* writev(2) */
  33. #endif
  34. #ifdef HAVE_SYS_TIME_H