mcicda: Exclude unused headers.
[wine] / dlls / crypt32 / tests / oid.c
1 /*
2  * Unit test suite for crypt32.dll's OID support functions.
3  *
4  * Copyright 2005 Juan Lang
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 #include <stdio.h>
21 #include <stdarg.h>
22 #include <windef.h>
23 #include <winbase.h>
24 #include <winerror.h>
25 #include <wincrypt.h>
26 #include <winreg.h>
27
28 #include "wine/test.h"
29
30 struct OIDToAlgID
31 {
32     LPCSTR oid;
33     DWORD algID;
34 };
35
36 static const struct OIDToAlgID oidToAlgID[] = {
37  { szOID_RSA_RSA, CALG_RSA_KEYX },
38  { szOID_RSA_MD2RSA, CALG_MD2 },
39  { szOID_RSA_MD4RSA, CALG_MD4 },
40  { szOID_RSA_MD5RSA, CALG_MD5 },
41  { szOID_RSA_SHA1RSA, CALG_SHA },
42  { szOID_RSA_DH, CALG_DH_SF },
43  { szOID_RSA_SMIMEalgESDH, CALG_DH_EPHEM },
44  { szOID_RSA_SMIMEalgCMS3DESwrap, CALG_3DES },
45  { szOID_RSA_SMIMEalgCMSRC2wrap, CALG_RC2 },
46  { szOID_RSA_MD2, CALG_MD2 },
47  { szOID_RSA_MD4, CALG_MD4 },
48  { szOID_RSA_MD5, CALG_MD5 },
49  { szOID_RSA_RC2CBC, CALG_RC2 },
50  { szOID_RSA_RC4, CALG_RC4 },
51  { szOID_RSA_DES_EDE3_CBC, CALG_3DES },
52  { szOID_ANSI_X942_DH, CALG_DH_SF },
53  { szOID_X957_DSA, CALG_DSS_SIGN },
54  { szOID_X957_SHA1DSA, CALG_SHA },
55  { szOID_OIWSEC_md4RSA, CALG_MD4 },
56  { szOID_OIWSEC_md5RSA, CALG_MD5 },
57  { szOID_OIWSEC_md4RSA2, CALG_MD4 },
58  { szOID_OIWSEC_desCBC, CALG_DES },
59  { szOID_OIWSEC_dsa, CALG_DSS_SIGN },
60  { szOID_OIWSEC_shaDSA, CALG_SHA },
61  { szOID_OIWSEC_shaRSA, CALG_SHA },
62  { szOID_OIWSEC_sha, CALG_SHA },
63  { szOID_OIWSEC_rsaXchg, CALG_RSA_KEYX },
64  { szOID_OIWSEC_sha1, CALG_SHA },
65  { szOID_OIWSEC_dsaSHA1, CALG_SHA },
66  { szOID_OIWSEC_sha1RSASign, CALG_SHA },
67  { szOID_OIWDIR_md2RSA, CALG_MD2 },
68  { szOID_INFOSEC_mosaicUpdatedSig, CALG_SHA },
69  { szOID_INFOSEC_mosaicKMandUpdSig, CALG_DSS_SIGN },
70 };
71
72 static const struct OIDToAlgID algIDToOID[] = {
73  { szOID_RSA_RSA, CALG_RSA_KEYX },
74  { szOID_RSA_SMIMEalgESDH, CALG_DH_EPHEM },
75  { szOID_RSA_MD2, CALG_MD2 },
76  { szOID_RSA_MD4, CALG_MD4 },
77  { szOID_RSA_MD5, CALG_MD5 },
78  { szOID_RSA_RC2CBC, CALG_RC2 },
79  { szOID_RSA_RC4, CALG_RC4 },
80  { szOID_RSA_DES_EDE3_CBC, CALG_3DES },
81  { szOID_ANSI_X942_DH, CALG_DH_SF },
82  { szOID_X957_DSA, CALG_DSS_SIGN },
83  { szOID_OIWSEC_desCBC, CALG_DES },
84  { szOID_OIWSEC_sha1, CALG_SHA },
85 };
86
87 static const WCHAR bogusDll[] = { 'b','o','g','u','s','.','d','l','l',0 };
88 static const WCHAR bogus2Dll[] = { 'b','o','g','u','s','2','.','d','l','l',0 };
89
90 static void testOIDToAlgID(void)
91 {
92     int i;
93     DWORD alg;
94
95     /* Test with a bogus one */
96     SetLastError(0xdeadbeef);
97     alg = CertOIDToAlgId("1.2.3");
98     ok(!alg && (GetLastError() == 0xdeadbeef ||
99      GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND),
100      "Expected ERROR_RESOURCE_NAME_NOT_FOUND or no error set, got %08x\n",
101      GetLastError());
102
103     for (i = 0; i < sizeof(oidToAlgID) / sizeof(oidToAlgID[0]); i++)
104     {
105         alg = CertOIDToAlgId(oidToAlgID[i].oid);
106         /* Not all Windows installations support all these, so make sure it's
107          * at least not the wrong one.
108          */
109         ok(alg == 0 || alg == oidToAlgID[i].algID,
110          "Expected %d, got %d\n", oidToAlgID[i].algID, alg);
111     }
112 }
113
114 static void testAlgIDToOID(void)
115 {
116     int i;
117     LPCSTR oid;
118
119     /* Test with a bogus one */
120     SetLastError(0xdeadbeef);
121     oid = CertAlgIdToOID(ALG_CLASS_SIGNATURE | ALG_TYPE_ANY | 80);
122     ok(!oid && GetLastError() == 0xdeadbeef,
123      "Didn't expect last error (%08x) to be set\n", GetLastError());
124     for (i = 0; i < sizeof(algIDToOID) / sizeof(algIDToOID[0]); i++)
125     {
126         oid = CertAlgIdToOID(algIDToOID[i].algID);
127         /* Allow failure, not every version of Windows supports every algo */
128         if (oid)
129             ok(!strcmp(oid, algIDToOID[i].oid), 
130              "Expected %s, got %s\n", algIDToOID[i].oid, oid);
131     }
132 }
133
134 static void test_oidFunctionSet(void)
135 {
136     HCRYPTOIDFUNCSET set1, set2;
137     BOOL ret;
138     LPWSTR buf = NULL;
139     DWORD size;
140
141     /* This crashes
142     set = CryptInitOIDFunctionSet(NULL, 0);
143      */
144
145     /* The name doesn't mean much */
146     set1 = CryptInitOIDFunctionSet("funky", 0);
147     ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError());
148     if (set1)
149     {
150         /* These crash
151         ret = CryptGetDefaultOIDDllList(NULL, 0, NULL, NULL);
152         ret = CryptGetDefaultOIDDllList(NULL, 0, NULL, &size);
153          */
154         size = 0;
155         ret = CryptGetDefaultOIDDllList(set1, 0, NULL, &size);
156         ok(ret, "CryptGetDefaultOIDDllList failed: %08x\n", GetLastError());
157         if (ret)
158         {
159             buf = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR));
160             if (buf)
161             {
162                 ret = CryptGetDefaultOIDDllList(set1, 0, buf, &size);
163                 ok(ret, "CryptGetDefaultOIDDllList failed: %08x\n",
164                  GetLastError());
165                 ok(!*buf, "Expected empty DLL list\n");
166                 HeapFree(GetProcessHeap(), 0, buf);
167             }
168         }
169     }
170
171     /* MSDN says flags must be 0, but it's not checked */
172     set1 = CryptInitOIDFunctionSet("", 1);
173     ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError());
174     set2 = CryptInitOIDFunctionSet("", 0);
175     ok(set2 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError());
176     /* There isn't a free function, so there must be only one set per name to
177      * limit leaks.  (I guess the sets are freed when crypt32 is unloaded.)
178      */
179     ok(set1 == set2, "Expected identical sets\n");
180     if (set1)
181     {
182         /* The empty name function set used here seems to correspond to
183          * DEFAULT.
184          */
185     }
186
187     /* There's no installed function for a built-in encoding. */
188     set1 = CryptInitOIDFunctionSet("CryptDllEncodeObject", 0);
189     ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError());
190     if (set1)
191     {
192         void *funcAddr;
193         HCRYPTOIDFUNCADDR hFuncAddr;
194
195         ret = CryptGetOIDFunctionAddress(set1, X509_ASN_ENCODING, X509_CERT, 0,
196          &funcAddr, &hFuncAddr);
197         ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
198          "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
199     }
200 }
201
202 typedef int (*funcY)(int);
203
204 static int funky(int x)
205 {
206     return x;
207 }
208
209 static void test_installOIDFunctionAddress(void)
210 {
211     BOOL ret;
212     CRYPT_OID_FUNC_ENTRY entry = { CRYPT_DEFAULT_OID, funky };
213     HCRYPTOIDFUNCSET set;
214
215     /* This crashes
216     ret = CryptInstallOIDFunctionAddress(NULL, 0, NULL, 0, NULL, 0);
217      */
218
219     /* Installing zero functions should work */
220     SetLastError(0xdeadbeef);
221     ret = CryptInstallOIDFunctionAddress(NULL, 0, "CryptDllEncodeObject", 0,
222      NULL, 0);
223     ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n",
224      GetLastError());
225
226     /* The function name doesn't much matter */
227     SetLastError(0xdeadbeef);
228     ret = CryptInstallOIDFunctionAddress(NULL, 0, "OhSoFunky", 0, NULL, 0);
229     ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n",
230      GetLastError());
231     SetLastError(0xdeadbeef);
232     entry.pszOID = X509_CERT;
233     ret = CryptInstallOIDFunctionAddress(NULL, 0, "OhSoFunky", 1, &entry, 0);
234     ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n",
235      GetLastError());
236     set = CryptInitOIDFunctionSet("OhSoFunky", 0);
237     ok(set != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError());
238     if (set)
239     {
240         funcY funcAddr = NULL;
241         HCRYPTOIDFUNCADDR hFuncAddr = NULL;
242
243         /* This crashes
244         ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, 0, 0, NULL,
245          NULL);
246          */
247         ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, 0, 0,
248          (void **)&funcAddr, &hFuncAddr);
249         ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
250          "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
251         ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, X509_CERT, 0,
252          (void **)&funcAddr, &hFuncAddr);
253         ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
254          "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
255         ret = CryptGetOIDFunctionAddress(set, 0, X509_CERT, 0,
256          (void **)&funcAddr, &hFuncAddr);
257         ok(ret, "CryptGetOIDFunctionAddress failed: %d\n", GetLastError());
258         if (funcAddr)
259         {
260             int y = funcAddr(0xabadc0da);
261
262             ok(y == 0xabadc0da, "Unexpected return (%d) from function\n", y);
263             CryptFreeOIDFunctionAddress(hFuncAddr, 0);
264         }
265     }
266 }
267
268 static void test_registerOIDFunction(void)
269 {
270     BOOL ret;
271
272     /* oddly, this succeeds under WinXP; the function name key is merely
273      * omitted.  This may be a side effect of the registry code, I don't know.
274      * I don't check it because I doubt anyone would depend on it.
275     ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, NULL,
276      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
277      */
278     /* On windows XP, GetLastError is incorrectly being set with an HRESULT,
279      * E_INVALIDARG
280      */
281     ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "foo", NULL, bogusDll,
282      NULL);
283     ok(!ret && GetLastError() == E_INVALIDARG,
284      "Expected E_INVALIDARG: %d\n", GetLastError());
285     /* This has no effect, but "succeeds" on XP */
286     ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "foo",
287      "1.2.3.4.5.6.7.8.9.10", NULL, NULL);
288     ok(ret, "Expected pseudo-success, got %d\n", GetLastError());
289     ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "CryptDllEncodeObject",
290      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
291     ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError());
292     ret = CryptUnregisterOIDFunction(X509_ASN_ENCODING, "CryptDllEncodeObject",
293      "1.2.3.4.5.6.7.8.9.10");
294     ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError());
295     ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "bogus",
296      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
297     ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError());
298     ret = CryptUnregisterOIDFunction(X509_ASN_ENCODING, "bogus",
299      "1.2.3.4.5.6.7.8.9.10");
300     ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError());
301     /* This has no effect */
302     ret = CryptRegisterOIDFunction(PKCS_7_ASN_ENCODING, "CryptDllEncodeObject",
303      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
304     ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError());
305     /* Check with bogus encoding type: */
306     ret = CryptRegisterOIDFunction(0, "CryptDllEncodeObject",
307      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
308     ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError());
309     /* This is written with value 3 verbatim.  Thus, the encoding type isn't
310      * (for now) treated as a mask.
311      */
312     ret = CryptRegisterOIDFunction(3, "CryptDllEncodeObject",
313      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
314     ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError());
315     ret = CryptUnregisterOIDFunction(3, "CryptDllEncodeObject",
316      "1.2.3.4.5.6.7.8.9.10");
317     ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError());
318 }
319
320 static void test_registerDefaultOIDFunction(void)
321 {
322     static const char fmt[] =
323      "Software\\Microsoft\\Cryptography\\OID\\EncodingType %d\\%s\\DEFAULT";
324     static const char func[] = "CertDllOpenStoreProv";
325     char buf[MAX_PATH];
326     BOOL ret;
327     long rc;
328     HKEY key;
329
330     ret = CryptRegisterDefaultOIDFunction(0, NULL, 0, NULL);
331     ok(!ret && GetLastError() == E_INVALIDARG,
332      "Expected E_INVALIDARG, got %08x\n", GetLastError());
333     /* This succeeds on WinXP, although the bogus entry is unusable.
334     ret = CryptRegisterDefaultOIDFunction(0, NULL, 0, bogusDll);
335      */
336     /* Register one at index 0 */
337     ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0,
338      bogusDll);
339     ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError());
340     /* Reregistering should fail */
341     ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0,
342      bogusDll);
343     ok(!ret && GetLastError() == ERROR_FILE_EXISTS,
344      "Expected ERROR_FILE_EXISTS, got %08x\n", GetLastError());
345     /* Registering the same one at index 1 should also fail */
346     ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 1,
347      bogusDll);
348     ok(!ret && GetLastError() == ERROR_FILE_EXISTS,
349      "Expected ERROR_FILE_EXISTS, got %08x\n", GetLastError());
350     /* Registering a different one at index 1 succeeds */
351     ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 1,
352      bogus2Dll);
353     ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError());
354     sprintf(buf, fmt, 0, func);
355     rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, buf, &key);
356     ok(rc == 0, "Expected key to exist, RegOpenKeyA failed: %ld\n", rc);
357     if (rc == 0)
358     {
359         static const CHAR dllA[] = "Dll";
360         static const CHAR bogusDll_A[] = "bogus.dll";
361         static const CHAR bogus2Dll_A[] = "bogus2.dll";
362         CHAR dllBuf[MAX_PATH];
363         DWORD type, size;
364         LPSTR ptr;
365
366         size = sizeof(dllBuf) / sizeof(dllBuf[0]);
367         rc = RegQueryValueExA(key, dllA, NULL, &type, (LPBYTE)dllBuf, &size);
368         ok(rc == 0,
369          "Expected Dll value to exist, RegQueryValueExA failed: %ld\n", rc);
370         ok(type == REG_MULTI_SZ, "Expected type REG_MULTI_SZ, got %d\n", type);
371         /* bogusDll was registered first, so that should be first */
372         ptr = dllBuf;
373         ok(!lstrcmpiA(ptr, bogusDll_A), "Unexpected dll\n");
374         ptr += lstrlenA(ptr) + 1;
375         ok(!lstrcmpiA(ptr, bogus2Dll_A), "Unexpected dll\n");
376         RegCloseKey(key);
377     }
378     /* Unregister both of them */
379     ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv",
380      bogusDll);
381     ok(ret, "CryptUnregisterDefaultOIDFunction failed: %08x\n",
382      GetLastError());
383     ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv",
384      bogus2Dll);
385     ok(ret, "CryptUnregisterDefaultOIDFunction failed: %08x\n",
386      GetLastError());
387     /* Now that they're both unregistered, unregistering should fail */
388     ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv",
389      bogusDll);
390     ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
391      "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
392
393     /* Repeat a few tests on the normal encoding type */
394     ret = CryptRegisterDefaultOIDFunction(X509_ASN_ENCODING,
395      "CertDllOpenStoreProv", 0, bogusDll);
396     ret = CryptUnregisterDefaultOIDFunction(X509_ASN_ENCODING,
397      "CertDllOpenStoreProv", bogusDll);
398     ok(ret, "CryptUnregisterDefaultOIDFunction failed\n");
399     ret = CryptUnregisterDefaultOIDFunction(X509_ASN_ENCODING,
400      "CertDllOpenStoreProv", bogusDll);
401     ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
402      "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
403 }
404
405 static BOOL WINAPI countOidInfo(PCCRYPT_OID_INFO pInfo, void *pvArg)
406 {
407     (*(DWORD *)pvArg)++;
408     return TRUE;
409 }
410
411 static BOOL WINAPI noOidInfo(PCCRYPT_OID_INFO pInfo, void *pvArg)
412 {
413     return FALSE;
414 }
415
416 static void test_enumOIDInfo(void)
417 {
418     BOOL ret;
419     DWORD count = 0;
420
421     /* This crashes
422     ret = CryptEnumOIDInfo(7, 0, NULL, NULL);
423      */
424
425     /* Silly tests, check that more than one thing is enumerated */
426     ret = CryptEnumOIDInfo(0, 0, &count, countOidInfo);
427     ok(ret && count > 0, "Expected more than item enumerated\n");
428     ret = CryptEnumOIDInfo(0, 0, NULL, noOidInfo);
429     ok(!ret, "Expected FALSE\n");
430 }
431
432 static void test_findOIDInfo(void)
433 {
434     static WCHAR sha1[] = { 's','h','a','1',0 };
435     static CHAR oid_rsa_md5[] = szOID_RSA_MD5;
436     ALG_ID alg = CALG_SHA1;
437     ALG_ID algs[2] = { CALG_MD5, CALG_RSA_SIGN };
438     PCCRYPT_OID_INFO info;
439
440     info = CryptFindOIDInfo(0, NULL, 0);
441     ok(info == NULL, "Expected NULL\n");
442     info = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY, oid_rsa_md5, 0);
443     ok(info != NULL, "Expected to find szOID_RSA_MD5\n");
444     if (info)
445     {
446         ok(!strcmp(info->pszOID, szOID_RSA_MD5), "Expected %s, got %s\n",
447          szOID_RSA_MD5, info->pszOID);
448         ok(U(*info).Algid == CALG_MD5, "Expected CALG_MD5, got %d\n",
449            U(*info).Algid);
450     }
451     info = CryptFindOIDInfo(CRYPT_OID_INFO_NAME_KEY, sha1, 0);
452     ok(info != NULL, "Expected to find sha1\n");
453     if (info)
454     {
455         ok(!strcmp(info->pszOID, szOID_OIWSEC_sha1), "Expected %s, got %s\n",
456          szOID_OIWSEC_sha1, info->pszOID);
457         ok(U(*info).Algid == CALG_SHA1, "Expected CALG_SHA1, got %d\n",
458            U(*info).Algid);
459     }
460     info = CryptFindOIDInfo(CRYPT_OID_INFO_ALGID_KEY, &alg, 0);
461     ok(info != NULL, "Expected to find sha1\n");
462     if (info)
463     {
464         ok(!strcmp(info->pszOID, szOID_OIWSEC_sha1), "Expected %s, got %s\n",
465          szOID_OIWSEC_sha1, info->pszOID);
466         ok(U(*info).Algid == CALG_SHA1, "Expected CALG_SHA1, got %d\n",
467            U(*info).Algid);
468     }
469     info = CryptFindOIDInfo(CRYPT_OID_INFO_SIGN_KEY, algs, 0);
470     ok(info != NULL, "Expected to find md5RSA\n");
471     if (info)
472     {
473         ok(!strcmp(info->pszOID, szOID_RSA_MD5RSA), "Expected %s, got %s\n",
474          szOID_RSA_MD5RSA, info->pszOID);
475         ok(U(*info).Algid == CALG_MD5, "Expected CALG_MD5, got %d\n",
476            U(*info).Algid);
477     }
478 }
479
480 START_TEST(oid)
481 {
482     testOIDToAlgID();
483     testAlgIDToOID();
484     test_enumOIDInfo();
485     test_findOIDInfo();
486     test_oidFunctionSet();
487     test_installOIDFunctionAddress();
488     test_registerOIDFunction();
489     test_registerDefaultOIDFunction();
490 }