summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-11-14 20:55:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-11-14 20:55:33 +0000
commit3e7e95559dd76e836d7e2bfa50719ea289b22cc6 (patch)
tree33aee2259474c70d08f990d39e4e355886fad1ed /src
parent4db4db4906537390e5371a83130ffd7d180ac000 (diff)
MS_CRYPTO_ENUM_PROVIDERS: service to get list of crypto providers
git-svn-id: http://svn.miranda-ng.org/main/trunk@6906 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/modules/crypt/encrypt.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/crypt/encrypt.cpp b/src/modules/crypt/encrypt.cpp
index ab73ac5671..4cb096e3ec 100644
--- a/src/modules/crypt/encrypt.cpp
+++ b/src/modules/crypt/encrypt.cpp
@@ -74,6 +74,15 @@ static INT_PTR srvRegister(WPARAM wParam, LPARAM lParam)
return 0;
}
+static INT_PTR srvEnumProviders(WPARAM wParam, LPARAM lParam)
+{
+ if (wParam && lParam) {
+ *(int*)wParam = arProviders.getCount();
+ *(CRYPTO_PROVIDER***)lParam = arProviders.getArray();
+ }
+ return 0;
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
int InitCrypt(void)
@@ -82,6 +91,7 @@ int InitCrypt(void)
CreateServiceFunction(MS_DB_CRYPT_DECODESTRING, DecodeString);
CreateServiceFunction(MS_CRYPTO_REGISTER_ENGINE, srvRegister);
+ CreateServiceFunction(MS_CRYPTO_ENUM_PROVIDERS, srvEnumProviders);
return 0;
}