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.

60 lines
1.3 KiB

  1. --- a/configure
  2. +++ b/configure
  3. @@ -1562,7 +1562,7 @@ if test x$enableval = xyes ; then
  4. #define HAVE_SSL 1
  5. EOF
  6. - LIBS="$LIBS -lssl"
  7. + LIBS="$LIBS -lgnutls-openssl"
  8. fi
  9. enableval=""
  10. --- a/configure.in
  11. +++ b/configure.in
  12. @@ -52,7 +52,7 @@ AC_ARG_ENABLE(ssl,
  13. [ --enable-ssl support for secure connection to mail server])
  14. if test x$enableval = xyes ; then
  15. AC_DEFINE(HAVE_SSL)
  16. - LIBS="$LIBS -lssl"
  17. + LIBS="$LIBS -lgnutls-openssl"
  18. fi
  19. enableval=""
  20. --- a/ssmtp.c
  21. +++ b/ssmtp.c
  22. @@ -26,11 +26,7 @@
  23. #include <ctype.h>
  24. #include <netdb.h>
  25. #ifdef HAVE_SSL
  26. -#include <openssl/crypto.h>
  27. -#include <openssl/x509.h>
  28. -#include <openssl/pem.h>
  29. -#include <openssl/ssl.h>
  30. -#include <openssl/err.h>
  31. +#include <gnutls/openssl.h>
  32. #endif
  33. #ifdef MD5AUTH
  34. #include "md5auth/hmac_md5.h"
  35. @@ -1133,7 +1129,7 @@ int smtp_open(char *host, int port)
  36. }
  37. if(use_cert == True) {
  38. - if(SSL_CTX_use_certificate_chain_file(ctx, tls_cert) <= 0) {
  39. + if(SSL_CTX_use_certificate_file(ctx, tls_cert, SSL_FILETYPE_PEM) <= 0) {
  40. perror("Use certfile");
  41. return(-1);
  42. }
  43. @@ -1143,10 +1139,13 @@ int smtp_open(char *host, int port)
  44. return(-1);
  45. }
  46. +#ifdef NOT_USED
  47. if(!SSL_CTX_check_private_key(ctx)) {
  48. log_event(LOG_ERR, "Private key does not match the certificate public key\n");
  49. return(-1);
  50. }
  51. +#endif
  52. +
  53. }
  54. #endif