Menu

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

Download this file

64 lines (55 with data), 1.5 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
63
Index: engines/e_capi.c
===================================================================
--- engines/e_capi.c (revision 839)
+++ engines/e_capi.c (working copy)
@@ -57,7 +57,10 @@
#include <openssl/crypto.h>
#include <openssl/buffer.h>
#include <openssl/bn.h>
+#include <shlwapi.h>
+#pragma comment(lib, "shlwapi.lib")
+
#ifdef OPENSSL_SYS_WIN32
#ifndef OPENSSL_NO_CAPIENG
@@ -575,6 +578,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) return;
@@ -582,6 +605,7 @@
ENGINE_free(toadd);
ERR_clear_error();
}
+ }
#endif
@@ -1734,8 +1758,10 @@
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.