crypt32: Input parameter checking.
[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 void testOIDToAlgID(void)
88 {
89     int i;
90     DWORD alg;
91
92     /* Test with a bogus one */
93     SetLastError(0xdeadbeef);
94     alg = CertOIDToAlgId("1.2.3");
95     ok(!alg && (GetLastError() == 0xdeadbeef ||
96      GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND),
97      "Expected ERROR_RESOURCE_NAME_NOT_FOUND or no error set, got %08x\n",
98      GetLastError());
99
100     for (i = 0; i < sizeof(oidToAlgID) / sizeof(oidToAlgID[0]); i++)
101     {
102         alg = CertOIDToAlgId(oidToAlgID[i].oid);
103         /* Not all Windows installations support all these, so make sure it's
104          * at least not the wrong one.
105          */
106         ok(alg == 0 || alg == oidToAlgID[i].algID,
107          "Expected %d, got %d\n", oidToAlgID[i].algID, alg);
108     }
109 }
110
111 static void testAlgIDToOID(void)
112 {
113     int i;
114     LPCSTR oid;
115
116     /* Test with a bogus one */
117     SetLastError(0xdeadbeef);
118     oid = CertAlgIdToOID(ALG_CLASS_SIGNATURE | ALG_TYPE_ANY | 80);
119     ok(!oid && GetLastError() == 0xdeadbeef,
120      "Didn't expect last error (%08x) to be set\n", GetLastError());
121     for (i = 0; i < sizeof(algIDToOID) / sizeof(algIDToOID[0]); i++)
122     {
123         oid = CertAlgIdToOID(algIDToOID[i].algID);
124         /* Allow failure, not every version of Windows supports every algo */
125         if (oid)
126             ok(!strcmp(oid, algIDToOID[i].oid), 
127              "Expected %s, got %s\n", algIDToOID[i].oid, oid);
128     }
129 }
130
131 static void test_oidFunctionSet(void)
132 {
133     HCRYPTOIDFUNCSET set1, set2;
134     BOOL ret;
135     LPWSTR buf = NULL;
136     DWORD size;
137
138     /* This crashes
139     set = CryptInitOIDFunctionSet(NULL, 0);
140      */
141
142     /* The name doesn't mean much */
143     set1 = CryptInitOIDFunctionSet("funky", 0);
144     ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError());
145     if (set1)
146     {
147         /* These crash
148         ret = CryptGetDefaultOIDDllList(NULL, 0, NULL, NULL);
149         ret = CryptGetDefaultOIDDllList(NULL, 0, NULL, &size);
150          */
151         size = 0;
152         ret = CryptGetDefaultOIDDllList(set1, 0, NULL, &size);
153         ok(ret, "CryptGetDefaultOIDDllList failed: %08x\n", GetLastError());
154         if (ret)
155         {
156             buf = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR));
157             if (buf)
158             {
159                 ret = CryptGetDefaultOIDDllList(set1, 0, buf, &size);
160                 ok(ret, "CryptGetDefaultOIDDllList failed: %08x\n",
161                  GetLastError());
162                 ok(!*buf, "Expected empty DLL list\n");
163                 HeapFree(GetProcessHeap(), 0, buf);
164             }
165         }
166     }
167
168     /* MSDN says flags must be 0, but it's not checked */
169     set1 = CryptInitOIDFunctionSet("", 1);
170     ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError());
171     set2 = CryptInitOIDFunctionSet("", 0);
172     ok(set2 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError());
173     /* There isn't a free function, so there must be only one set per name to
174      * limit leaks.  (I guess the sets are freed when crypt32 is unloaded.)
175      */
176     ok(set1 == set2, "Expected identical sets\n");
177     if (set1)
178     {
179         /* The empty name function set used here seems to correspond to
180          * DEFAULT.
181          */
182     }
183
184     /* There's no installed function for a built-in encoding. */
185     set1 = CryptInitOIDFunctionSet("CryptDllEncodeObject", 0);
186     ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError());
187     if (set1)
188     {
189         void *funcAddr;
190         HCRYPTOIDFUNCADDR hFuncAddr;
191
192         ret = CryptGetOIDFunctionAddress(set1, X509_ASN_ENCODING, X509_CERT, 0,
193          &funcAddr, &hFuncAddr);
194         ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
195          "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
196     }
197 }
198
199 typedef int (*funcY)(int);
200
201 static int funky(int x)
202 {
203     return x;
204 }
205
206 static void test_installOIDFunctionAddress(void)
207 {
208     BOOL ret;
209     CRYPT_OID_FUNC_ENTRY entry = { CRYPT_DEFAULT_OID, funky };
210     HCRYPTOIDFUNCSET set;
211
212     /* This crashes
213     ret = CryptInstallOIDFunctionAddress(NULL, 0, NULL, 0, NULL, 0);
214      */
215
216     /* Installing zero functions should work */
217     SetLastError(0xdeadbeef);
218     ret = CryptInstallOIDFunctionAddress(NULL, 0, "CryptDllEncodeObject", 0,
219      NULL, 0);
220     ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n",
221      GetLastError());
222
223     /* The function name doesn't much matter */
224     SetLastError(0xdeadbeef);
225     ret = CryptInstallOIDFunctionAddress(NULL, 0, "OhSoFunky", 0, NULL, 0);
226     ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n",
227      GetLastError());
228     SetLastError(0xdeadbeef);
229     entry.pszOID = X509_CERT;
230     ret = CryptInstallOIDFunctionAddress(NULL, 0, "OhSoFunky", 1, &entry, 0);
231     ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n",
232      GetLastError());
233     set = CryptInitOIDFunctionSet("OhSoFunky", 0);
234     ok(set != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError());
235     if (set)
236     {
237         funcY funcAddr = NULL;
238         HCRYPTOIDFUNCADDR hFuncAddr = NULL;
239
240         /* This crashes
241         ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, 0, 0, NULL,
242          NULL);
243          */
244         ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, 0, 0,
245          (void **)&funcAddr, &hFuncAddr);
246         ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
247          "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
248         ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, X509_CERT, 0,
249          (void **)&funcAddr, &hFuncAddr);
250         ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
251          "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
252         ret = CryptGetOIDFunctionAddress(set, 0, X509_CERT, 0,
253          (void **)&funcAddr, &hFuncAddr);
254         ok(ret, "CryptGetOIDFunctionAddress failed: %d\n", GetLastError());
255         if (funcAddr)
256         {
257             int y = funcAddr(0xabadc0da);
258
259             ok(y == 0xabadc0da, "Unexpected return (%d) from function\n", y);
260             CryptFreeOIDFunctionAddress(hFuncAddr, 0);
261         }
262     }
263 }
264
265 static void test_registerOIDFunction(void)
266 {
267     static const WCHAR bogusDll[] = { 'b','o','g','u','s','.','d','l','l',0 };
268     BOOL ret;
269
270     /* oddly, this succeeds under WinXP; the function name key is merely
271      * omitted.  This may be a side effect of the registry code, I don't know.
272      * I don't check it because I doubt anyone would depend on it.
273     ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, NULL,
274      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
275      */
276     /* On windows XP, GetLastError is incorrectly being set with an HRESULT,
277      * E_INVALIDARG
278      */
279     ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "foo", NULL, bogusDll,
280      NULL);
281     ok(!ret && GetLastError() == E_INVALIDARG,
282      "Expected E_INVALIDARG: %d\n", GetLastError());
283     /* This has no effect, but "succeeds" on XP */
284     ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "foo",
285      "1.2.3.4.5.6.7.8.9.10", NULL, NULL);
286     ok(ret, "Expected pseudo-success, got %d\n", GetLastError());
287     ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "CryptDllEncodeObject",
288      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
289     ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError());
290     ret = CryptUnregisterOIDFunction(X509_ASN_ENCODING, "CryptDllEncodeObject",
291      "1.2.3.4.5.6.7.8.9.10");
292     ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError());
293     ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "bogus",
294      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
295     ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError());
296     ret = CryptUnregisterOIDFunction(X509_ASN_ENCODING, "bogus",
297      "1.2.3.4.5.6.7.8.9.10");
298     ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError());
299     /* This has no effect */
300     ret = CryptRegisterOIDFunction(PKCS_7_ASN_ENCODING, "CryptDllEncodeObject",
301      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
302     ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError());
303     /* Check with bogus encoding type: */
304     ret = CryptRegisterOIDFunction(0, "CryptDllEncodeObject",
305      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
306     ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError());
307     /* This is written with value 3 verbatim.  Thus, the encoding type isn't
308      * (for now) treated as a mask.
309      */
310     ret = CryptRegisterOIDFunction(3, "CryptDllEncodeObject",
311      "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL);
312     ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError());
313     ret = CryptUnregisterOIDFunction(3, "CryptDllEncodeObject",
314      "1.2.3.4.5.6.7.8.9.10");
315     ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError());
316 }
317
318 static const WCHAR bogusDll[] = { 'b','o','g','u','s','.','d','l','l',0 };
319 static const WCHAR bogus2Dll[] = { 'b','o','g','u','s','2','.','d','l','l',0 };
320
321 static void test_registerDefaultOIDFunction(void)
322 {
323     static const char fmt[] =
324      "Software\\Microsoft\\Cryptography\\OID\\EncodingType %d\\%s\\DEFAULT";
325     static const char func[] = "CertDllOpenStoreProv";
326     char buf[MAX_PATH];
327     BOOL ret;
328     long rc;
329     HKEY key;
330
331     ret = CryptRegisterDefaultOIDFunction(0, NULL, 0, NULL);
332     ok(!ret && GetLastError() == E_INVALIDARG,
333      "Expected E_INVALIDARG, got %08x\n", GetLastError());
334     /* This succeeds on WinXP, although the bogus entry is unusable.
335     ret = CryptRegisterDefaultOIDFunction(0, NULL, 0, bogusDll);
336      */
337     /* Register one at index 0 */
338     ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0,
339      bogusDll);
340     ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError());
341     /* Reregistering should fail */
342     ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0,
343      bogusDll);
344     ok(!ret && GetLastError() == ERROR_FILE_EXISTS,
345      "Expected ERROR_FILE_EXISTS, got %08x\n", GetLastError());
346     /* Registering the same one at index 1 should also fail */
347     ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 1,
348      bogusDll);
349     ok(!ret && GetLastError() == ERROR_FILE_EXISTS,
350      "Expected ERROR_FILE_EXISTS, got %08x\n", GetLastError());
351     /* Registering a different one at index 1 succeeds */
352     ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 1,
353      bogus2Dll);
354     ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError());
355     sprintf(buf, fmt, 0, func);
356     rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, buf, &key);
357     ok(rc == 0, "Expected key to exist, RegOpenKeyW failed: %ld\n", rc);
358     if (rc == 0)
359     {
360         static const WCHAR dllW[] = { 'D','l','l',0 };
361         WCHAR dllBuf[MAX_PATH];
362         DWORD type, size;
363         LPWSTR ptr;
364
365         size = sizeof(dllBuf) / sizeof(dllBuf[0]);
366         rc = RegQueryValueExW(key, dllW, NULL, &type, (LPBYTE)dllBuf, &size);
367         ok(rc == 0,
368          "Expected Dll value to exist, RegQueryValueExW failed: %ld\n", rc);
369         ok(type == REG_MULTI_SZ, "Expected type REG_MULTI_SZ, got %d\n", type);
370         /* bogusDll was registered first, so that should be first */
371         ptr = dllBuf;
372         ok(!lstrcmpiW(ptr, bogusDll), "Unexpected dll\n");
373         ptr += lstrlenW(ptr) + 1;
374         ok(!lstrcmpiW(ptr, bogus2Dll), "Unexpected dll\n");
375         RegCloseKey(key);
376     }
377     /* Unregister both of them */
378     ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv",
379      bogusDll);
380     ok(ret, "CryptUnregisterDefaultOIDFunction failed: %08x\n",
381      GetLastError());
382     ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv",
383      bogus2Dll);
384     ok(ret, "CryptUnregisterDefaultOIDFunction failed: %08x\n",
385      GetLastError());
386     /* Now that they're both unregistered, unregistering should fail */
387     ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv",
388      bogusDll);
389     ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
390      "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
391
392     /* Repeat a few tests on the normal encoding type */
393     ret = CryptRegisterDefaultOIDFunction(X509_ASN_ENCODING,
394      "CertDllOpenStoreProv", 0, bogusDll);
395     ret = CryptUnregisterDefaultOIDFunction(X509_ASN_ENCODING,
396      "CertDllOpenStoreProv", bogusDll);
397     ok(ret, "CryptUnregisterDefaultOIDFunction failed\n");
398     ret = CryptUnregisterDefaultOIDFunction(X509_ASN_ENCODING,
399      "CertDllOpenStoreProv", bogusDll);
400     ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
401      "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
402 }
403
404 static BOOL WINAPI countOidInfo(PCCRYPT_OID_INFO pInfo, void *pvArg)
405 {
406     (*(DWORD *)pvArg)++;
407     return TRUE;
408 }
409
410 static BOOL WINAPI noOidInfo(PCCRYPT_OID_INFO pInfo, void *pvArg)
411 {
412     return FALSE;
413 }
414
415 static void test_enumOIDInfo(void)
416 {
417     BOOL ret;
418     DWORD count = 0;
419
420     /* This crashes
421     ret = CryptEnumOIDInfo(7, 0, NULL, NULL);
422      */
423
424     /* Silly tests, check that more than one thing is enumerated */
425     ret = CryptEnumOIDInfo(0, 0, &count, countOidInfo);
426     ok(ret && count > 0, "Expected more than item enumerated\n");
427     ret = CryptEnumOIDInfo(0, 0, NULL, noOidInfo);
428     ok(!ret, "Expected FALSE\n");
429 }
430
431 static void test_findOIDInfo(void)
432 {
433     static WCHAR sha1[] = { 's','h','a','1',0 };
434     static CHAR oid_rsa_md5[] = szOID_RSA_MD5;
435     ALG_ID alg = CALG_SHA1;
436     ALG_ID algs[2] = { CALG_MD5, CALG_RSA_SIGN };
437     PCCRYPT_OID_INFO info;
438
439     info = CryptFindOIDInfo(0, NULL, 0);
440     ok(info == NULL, "Expected NULL\n");
441     info = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY, oid_rsa_md5, 0);
442     ok(info != NULL, "Expected to find szOID_RSA_MD5\n");
443     if (info)
444     {
445         ok(!strcmp(info->pszOID, szOID_RSA_MD5), "Expected %s, got %s\n",
446          szOID_RSA_MD5, info->pszOID);
447         ok(U(*info).Algid == CALG_MD5, "Expected CALG_MD5, got %d\n",
448            U(*info).Algid);
449     }
450     info = CryptFindOIDInfo(CRYPT_OID_INFO_NAME_KEY, sha1, 0);
451     ok(info != NULL, "Expected to find sha1\n");
452     if (info)
453     {
454         ok(!strcmp(info->pszOID, szOID_OIWSEC_sha1), "Expected %s, got %s\n",
455          szOID_OIWSEC_sha1, info->pszOID);
456         ok(U(*info).Algid == CALG_SHA1, "Expected CALG_SHA1, got %d\n",
457            U(*info).Algid);
458     }
459     info = CryptFindOIDInfo(CRYPT_OID_INFO_ALGID_KEY, &alg, 0);
460     ok(info != NULL, "Expected to find sha1\n");
461     if (info)
462     {
463         ok(!strcmp(info->pszOID, szOID_OIWSEC_sha1), "Expected %s, got %s\n",
464          szOID_OIWSEC_sha1, info->pszOID);
465         ok(U(*info).Algid == CALG_SHA1, "Expected CALG_SHA1, got %d\n",
466            U(*info).Algid);
467     }
468     info = CryptFindOIDInfo(CRYPT_OID_INFO_SIGN_KEY, algs, 0);
469     ok(info != NULL, "Expected to find md5RSA\n");
470     if (info)
471     {
472         ok(!strcmp(info->pszOID, szOID_RSA_MD5RSA), "Expected %s, got %s\n",
473          szOID_RSA_MD5RSA, info->pszOID);
474         ok(U(*info).Algid == CALG_MD5, "Expected CALG_MD5, got %d\n",
475            U(*info).Algid);
476     }
477 }
478
479 START_TEST(oid)
480 {
481     testOIDToAlgID();
482     testAlgIDToOID();
483     test_enumOIDInfo();
484     test_findOIDInfo();
485     test_oidFunctionSet();
486     test_installOIDFunctionAddress();
487     test_registerOIDFunction();
488     test_registerDefaultOIDFunction();
489 }