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.

65 lines
2.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../qt-qca-tls/openssl098.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE 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. diff -Nur qca-tls-1.0.orig/configure qca-tls-1.0/configure
  17. --- qca-tls-1.0.orig/configure 2003-12-18 00:54:50.000000000 +0200
  18. +++ qca-tls-1.0/configure 2005-11-04 14:38:14.000000000 +0200
  19. @@ -174,6 +174,19 @@
  20. return false;
  21. if(ret == 0)
  22. conf->addDefine("OSSL_097");
  23. +
  24. + // is it at least openssl 0.9.8?
  25. + str =
  26. + "#include<openssl/opensslv.h>\n"
  27. + "int main()\n"
  28. + "{\n"
  29. + " unsigned long x = OPENSSL_VERSION_NUMBER;\n"
  30. + " if(x >= 0x00908000) return 0; else return 1;\n"
  31. + "}\n";
  32. + if(!conf->doCompileAndLink(str, ext, &ret))
  33. + return false;
  34. + if(ret == 0)
  35. + conf->addDefine("OSSL_098");
  36. if(!inc.isEmpty())
  37. conf->addIncludePath(inc);
  38. diff -Nur qca-tls-1.0.orig/qca-tls.cpp qca-tls-1.0/qca-tls.cpp
  39. --- qca-tls-1.0.orig/qca-tls.cpp 2003-12-10 18:53:57.000000000 +0200
  40. +++ qca-tls-1.0/qca-tls.cpp 2005-11-04 14:42:35.000000000 +0200
  41. @@ -454,7 +454,11 @@
  42. if(!r) {
  43. // try this other public function, for whatever reason
  44. p = (void *)in;
  45. +#ifdef OSSL_098
  46. + r = d2i_RSA_PUBKEY(NULL, (const unsigned char **)&p, len);
  47. +#else
  48. r = d2i_RSA_PUBKEY(NULL, (unsigned char **)&p, len);
  49. +#endif
  50. }
  51. if(r) {
  52. if(pub) {
  53. @@ -799,7 +803,11 @@
  54. bool createFromDER(const char *in, unsigned int len)
  55. {
  56. unsigned char *p = (unsigned char *)in;
  57. +#ifdef OSSL_098
  58. + X509 *t = d2i_X509(NULL, (const unsigned char**)&p, len);
  59. +#else
  60. X509 *t = d2i_X509(NULL, &p, len);
  61. +#endif
  62. if(!t)
  63. return false;
  64. fromX509(t);