Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --- Makefile 2014-12-12 22:58:34.000000000 +0100
  2. +++ Makefile 2015-08-03 23:40:32.177619138 +0200
  3. @@ -61,6 +61,7 @@
  4. sbindir = $(exec_prefix)/sbin
  5. bindir = $(exec_prefix)/bin
  6. archdir = $(rubyarchdir)
  7. +top_srcdir = ../..
  8. CC = gcc
  9. --- ossl_ssl.c 2014-12-12 22:58:34.000000000 +0100
  10. +++ ossl_ssl.c 2015-08-03 23:40:32.177619138 +0200
  11. @@ -1878,6 +1878,19 @@
  12. # endif
  13. #endif /* !defined(OPENSSL_NO_SOCK) */
  14. +#if OPENSSL_VERSION_NUMBER >= 0x10002000L
  15. +static VALUE
  16. +ossl_ssl_tmp_key(VALUE self)
  17. +{
  18. + SSL *ssl;
  19. + EVP_PKEY *key;
  20. + ossl_ssl_data_get_struct(self, ssl);
  21. + if (!SSL_get_server_tmp_key(ssl, &key))
  22. + return Qnil;
  23. + return ossl_pkey_new(key);
  24. +}
  25. +#endif
  26. +
  27. void
  28. Init_ossl_ssl(void)
  29. {
  30. @@ -2238,6 +2241,9 @@
  31. rb_define_method(cSSLSocket, "session=", ossl_ssl_set_session, 1);
  32. rb_define_method(cSSLSocket, "verify_result", ossl_ssl_get_verify_result, 0);
  33. rb_define_method(cSSLSocket, "client_ca", ossl_ssl_get_client_ca_list, 0);
  34. +#if OPENSSL_VERSION_NUMBER >= 0x10002000L
  35. + rb_define_method(cSSLSocket, "tmp_key", ossl_ssl_tmp_key, 0);
  36. +#endif
  37. # ifdef HAVE_OPENSSL_NPN_NEGOTIATED
  38. rb_define_method(cSSLSocket, "npn_protocol", ossl_ssl_npn_protocol, 0);
  39. # endif