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.

53 lines
1.8 KiB

  1. --- a/ext/dtls/gstdtlsagent.c
  2. +++ b/ext/dtls/gstdtlsagent.c
  3. @@ -124,11 +124,11 @@ _gst_dtls_init_openssl (void)
  4. }
  5. GST_INFO_OBJECT (NULL, "initializing openssl %lx", OPENSSL_VERSION_NUMBER);
  6. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  7. SSL_library_init ();
  8. SSL_load_error_strings ();
  9. ERR_load_BIO_strings ();
  10. -#if OPENSSL_VERSION_NUMBER < 0x10100000L
  11. {
  12. gint i;
  13. gint num_locks;
  14. @@ -197,7 +197,7 @@ gst_dtls_agent_init (GstDtlsAgent * self)
  15. SSL_CTX_set_cipher_list (priv->ssl_context,
  16. "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
  17. SSL_CTX_set_read_ahead (priv->ssl_context, 1);
  18. -#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
  19. +#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
  20. SSL_CTX_set_ecdh_auto (priv->ssl_context, 1);
  21. #endif
  22. }
  23. --- a/ext/dtls/gstdtlscertificate.c
  24. +++ b/ext/dtls/gstdtlscertificate.c
  25. @@ -45,8 +45,15 @@
  26. #endif
  27. #endif
  28. +#include <openssl/bn.h>
  29. +#include <openssl/rsa.h>
  30. #include <openssl/ssl.h>
  31. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  32. +#define X509_getm_notBefore X509_get_notBefore
  33. +#define X509_getm_notAfter X509_get_notAfter
  34. +#endif
  35. +
  36. GST_DEBUG_CATEGORY_STATIC (gst_dtls_certificate_debug);
  37. #define GST_CAT_DEFAULT gst_dtls_certificate_debug
  38. @@ -240,8 +247,8 @@ init_generated (GstDtlsCertificate * self)
  39. X509_set_version (priv->x509, 2);
  40. ASN1_INTEGER_set (X509_get_serialNumber (priv->x509), 0);
  41. - X509_gmtime_adj (X509_get_notBefore (priv->x509), 0);
  42. - X509_gmtime_adj (X509_get_notAfter (priv->x509), 31536000L); /* A year */
  43. + X509_gmtime_adj (X509_getm_notBefore (priv->x509), 0);
  44. + X509_gmtime_adj (X509_getm_notAfter (priv->x509), 31536000L); /* A year */
  45. X509_set_pubkey (priv->x509, priv->private_key);
  46. name = X509_get_subject_name (priv->x509);