OpenSDE Packages Database (without history before r20070)
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.

46 lines
1.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../openssl/openssl-1.0.1e-SSL_get_certificate.patch
  5. # Copyright (C) 2013 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From 147dbb2fe3bead7a10e2f280261b661ce7af7adc Mon Sep 17 00:00:00 2001
  17. From: "Dr. Stephen Henson" <steve@openssl.org>
  18. Date: Mon, 11 Feb 2013 18:24:03 +0000
  19. Subject: [PATCH] Fix for SSL_get_certificate
  20. Now we set the current certificate to the one used by a server
  21. there is no need to call ssl_get_server_send_cert which will
  22. fail if we haven't sent a certificate yet.
  23. ---
  24. ssl/ssl_lib.c | 4 +---
  25. 1 file changed, 1 insertion(+), 3 deletions(-)
  26. diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
  27. index 14d143d..ff5a85a 100644
  28. --- a/ssl/ssl_lib.c
  29. +++ b/ssl/ssl_lib.c
  30. @@ -2792,9 +2792,7 @@ void ssl_clear_cipher_ctx(SSL *s)
  31. /* Fix this function so that it takes an optional type parameter */
  32. X509 *SSL_get_certificate(const SSL *s)
  33. {
  34. - if (s->server)
  35. - return(ssl_get_server_send_cert(s));
  36. - else if (s->cert != NULL)
  37. + if (s->cert != NULL)
  38. return(s->cert->key->x509);
  39. else
  40. return(NULL);
  41. --
  42. 1.7.9.5