projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e0f7b87
)
Use an appropriate Window for selection dialog.
author
Dr. Stephen Henson
<steve@openssl.org>
Wed, 4 Jun 2008 16:45:05 +0000
(16:45 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Wed, 4 Jun 2008 16:45:05 +0000
(16:45 +0000)
engines/e_capi.c
patch
|
blob
|
history
diff --git
a/engines/e_capi.c
b/engines/e_capi.c
index 76b05b76abe0aadada1ecd1aa19ab2087394571f..ec8dab0f0767e2a091d6da8424fc5f8952153cbd 100644
(file)
--- a/
engines/e_capi.c
+++ b/
engines/e_capi.c
@@
-1618,6
+1618,9
@@
static int client_cert_select(ENGINE *e, SSL *ssl, STACK_OF(X509) *certs)
#include <cryptuiapi.h>
#include <cryptuiapi.h>
+#define dlg_title L"OpenSSL Application SSL Client Certificate Selection"
+#define dlg_prompt L"Select a certificate to use for authentication"
+
static int client_cert_select(ENGINE *e, SSL *ssl, STACK_OF(X509) *certs)
{
X509 *x;
static int client_cert_select(ENGINE *e, SSL *ssl, STACK_OF(X509) *certs)
{
X509 *x;
@@
-1625,6
+1628,7
@@
static int client_cert_select(ENGINE *e, SSL *ssl, STACK_OF(X509) *certs)
PCCERT_CONTEXT cert;
CAPI_CTX *ctx;
CAPI_KEY *key;
PCCERT_CONTEXT cert;
CAPI_CTX *ctx;
CAPI_KEY *key;
+ HWND hwnd;
int i, idx = -1;
ctx = ENGINE_get_ex_data(e, capi_idx);
/* Create an in memory store of certificates */
int i, idx = -1;
ctx = ENGINE_get_ex_data(e, capi_idx);
/* Create an in memory store of certificates */
@@
-1651,8
+1655,12
@@
static int client_cert_select(ENGINE *e, SSL *ssl, STACK_OF(X509) *certs)
}
}
}
}
+ hwnd = GetActiveWindow();
+ if (!hwnd)
+ hwnd = GetConsoleWindow();
/* Call dialog to select one */
/* Call dialog to select one */
- cert = CryptUIDlgSelectCertificateFromStore(dstore, NULL,NULL, NULL,
+ cert = CryptUIDlgSelectCertificateFromStore(dstore, hwnd,
+ dlg_title, dlg_prompt,
0, 0, NULL);
/* Find matching cert from list */
0, 0, NULL);
/* Find matching cert from list */