Menu

[r1152]: / trunk / ext / build / openssl.patch  Maximize  Restore  History

Download this file

63 lines (57 with data), 1.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Index: engines/e_capi.c
===================================================================
--- engines/e_capi.c (revision 1134)
+++ engines/e_capi.c (working copy)
@@ -72,9 +72,11 @@
# include <windows.h>
# include <wincrypt.h>
# include <malloc.h>
+# include <shlwapi.h>
# ifndef alloca
# define alloca _alloca
# endif
+# pragma comment(lib, "shlwapi.lib")
/*
* This module uses several "new" interfaces, among which is
@@ -591,6 +593,26 @@
void ENGINE_load_capi(void)
{
+ DWORD dwType = 0;
+ DWORD dwData = 0;
+ DWORD dwDataSize = 4;
+ int bLoad = 1;
+#ifdef _WIN64
+ if (SHGetValue(HKEY_CURRENT_USER, L"Software\\TortoiseSVN", L"OpenSSLCapi", &dwType, &dwData, &dwDataSize) == ERROR_SUCCESS)
+#else
+ if (SHGetValue(HKEY_CURRENT_USER, "Software\\TortoiseSVN", "OpenSSLCapi", &dwType, &dwData, &dwDataSize) == ERROR_SUCCESS)
+#endif
+ {
+ if (dwType == REG_DWORD)
+ {
+ if (dwData == 0)
+ {
+ bLoad = 0;
+ }
+ }
+ }
+ if (bLoad)
+ {
/* Copied from eng_[openssl|dyn].c */
ENGINE *toadd = engine_capi();
if (!toadd)
@@ -598,6 +620,7 @@
ENGINE_add(toadd);
ENGINE_free(toadd);
ERR_clear_error();
+ }
}
# endif
@@ -1784,7 +1807,9 @@
static int cert_select_simple(ENGINE *e, SSL *ssl, STACK_OF(X509) *certs)
{
- return 0;
+ if (sk_X509_num(certs) == 1)
+ return 0;
+ return -1; /* let TSVN decide which certificate to use */
}
# ifdef OPENSSL_CAPIENG_DIALOG
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.