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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
|
{
Automatically converted by H2Pas 1.0.0 from nzt.h
The following command line parameters were used:
-p
-D
-l
jojo.so
nzt.h
}
{$PACKRECORDS C}
type
Pnzctx = pointer;
PPub1 = pointer;
PPnzttIdentity = pointer;
PPnzttPersona = pointer;
PPtext = pointer;
Pnzstrc = pointer;
{ DISABLE check_long_lines }
{ Copyright (c) 1996, 2004, Oracle. All rights reserved. }
{ Copyright (c) 1996, 2004, Oracle. All rights reserved. }
{
* $Header: nzt.h 10-aug-2004.11:55:06 rchahal Exp $
}
{
* NAME
* nzt.h
*
* DESCRIPTION
* Toolkit public declarations.
*
* PUBLIC FUNCTIONS
* nztwOpenWallet - Open a wallet based on a WRL and pwd.
* nztwCloseWallet - Close a wallet.
* + nztwCreateWallet - Create a new wallet.
* + nztwDestroyWallet - Destroy an existing wallet.
* nztwRetrievePersonaCopy - Retieve a copy of a particular persona.
* + nzteStorePersona - Store a persona in the wallet.
* nzteOpenPersona - Open a persona.
* nzteClosePersona - Close a persona.
* + nzteRemovePersona - Remove a persona from a wallet.
* + nzteCreatePersona - Create a persona.
* nzteDestroyPersona - Destroy a persona.
* nztiStoreTrustedIdentity - Store an identity with associated trust.
* nzteRetrieveTrustedIdentCopy - Retrieves a trusted identity from persona
* + nzteSetProtection - Modify the protection set in a persona.
* + nzteGetProtection - Get the protection set in a persona
* nztePriKey - Get the Private Key (X509 Only)
* nzteMyCert - Get the Certificate (X509 only)
* nzteX509CreatePersona - Create a persona given an X509 Certificate.
* + nztiRemoveIdentity - Remove an identity from a persona.
* nztiCreateIdentity - Create an identity.
* nztiDuplicateIdentity - Create a complete copy of an identity.
* nztiAbortIdentity - Discard an unstored identity.
* nztidGetIdentityDesc - Gets Identity Description from Identity.
* nztidFreeIdentityDesc - Frees memory for Identity Desc object.
* nztSign - Generate an attached signature.
* + nztxSignExpansion - Determine size of signature.
* nztVerify - Verify an attached signature.
* nztValidate - Validate an identity.
* nztsd_SignDetached - Generate a detached signature.
* + nztxsd_SignDetachedExpansion - Determine size of detached signature.
* nztved_VerifyDetached - Verify a detached signature.
* + nztEncrypt - Symmetric key encryption.
* + nztxEncryptExpansion - Determine the tdu length for encryption.
* + nztDecrypt - Symmetric key decryption.
* + nztEnvelope - Sign then encrypt data for recipient(s).
* + nztDeEnvelope - Reverse nztEnvelope.
* + nztKeyedHash - Generate keyed hash.
* + nztxKeyedHashExpansion - Determine size of TDU for keyed hash.
* nztHash - Generate hash.
* + nztxHashExpansion - Determine the size of the TDU for a hash.
* nztSeedRandom - See the random number generator.
* nztrb_RandomBytes - Generate a series of random bytes.
* nztrn_RandomNumber - Generate a random number.
* nztbbInitBlock - Initialize a buffer block.
* nztbbReuseBlock - Reuse a buffer block.
* nztbbSizeBlock - Find the size of the buffer block.
* nztbbGrowBlock - Grow initialized buffer block by 'inc' bytes.
* nztbbPurgeBlock - Purge the memory used within a buffer block.
* nztbbSetBlock - Set block to known state.
* nztkec_PKEncrypt - Encrypt data then encrypt key for recipient.
* nztkdc_PKDecrypt - Decrypt PKEncrypt'ed data.
* nztific_FreeIdentityContent - Free the contents of an identity.
* nztifdn - Create an identity from a distinguished name
* nztcts_CipherSpecToStr - Converts the Cipher Spec Code To String
* nztiae_IsAuthEnabled - Checks to see if Authentication is Enabled
* in the current Cipher Spec.
* nztiae_IsEncrEnabled - Checks to see if Encryption is Enabled
* in the current Cipher Spec.
* nztiae_IsHashEnabled - Checks to see if Hashing is Enabled
* in the current Cipher Spec.
* nztwGetCertInfo - Get peer certificate info
*
* NOTE: the '+' indicates that these functions are UNSUPPORTED at this time.
*
* NOTES
*
* MODIFIED
* rchahal 07/27/04 - add keyusage
* srtata 11/10/03 - fix nztSetAppDefaultLocation header
* rchahal 10/15/03 - bug 2513821
* rchahal 11/11/02 - pkcs11 support
* akoyfman 07/05/02 - adding secret store to persona
* supriya 10/11/01 - Fix for bug # 2015732
* ajacobs 04/04/01 - make NZT_REGISTRY_WRL always available
* ajacobs 03/06/01 - olint fix
* ajacobs 03/02/01 - Add GetCertInfo
* supriya 02/23/01 - Move nzttKPUsage from nzt0.h
* rchahal 01/26/01 - olint fixes
* supriya 12/07/00 - Change fn name
* supriya 12/01/00 - Certificate API's needed for iAS
* supriya 06/19/00 - Adding definitions for MCS and ENTR
* lkethana 05/31/00 - multiple cert support
* skanjila 06/25/99 - Remove nztcts_CipherSpecToStr() to NZOS.
* skanjila 06/23/99 - Change API of nztcts_CipherSpecToStr.
* lkethana 06/18/99 - rem nztIPrivateAlloc, etc
* lkethana 06/10/99 - changing size_t to ub4
* lkethana 06/02/99 - add api for getting auth/encry/hash capability of c
* arswamin 12/28/98 - add NZT_MAX_MD5.
* arswamin 12/21/98 - change signature of compareDN
* qdinh 12/21/98 - change size_t to ub4.
* inetwork 11/22/98 - Removing NZDEPRECATED definition
* amthakur 09/14/98 - deprecating and updating the c-structures.
* arswamin 09/24/98 - adding NZTTWRL_NULL for SSO support.
* amthakur 07/30/98 - changing the prototype of nztGetCertChain.
* qdinh 05/01/98 - add NZTTIDENTTYPE_INVALID_TYPE
* qdinh 04/17/98 - add NZTTWRL_ORACLE.
* ascott 10/08/97 - implement nztiStoreTrustedIdentity
* ascott 10/07/97 - add nztiGetIdentityDesc
* ascott 09/28/97 - clarify prototype comments and error codes
* ascott 09/05/97 - update identity: create, destroy, duplicate
* ascott 08/21/97 - add GetCert and GetPriKey
* ascott 08/07/97 - add other WRL settings
* asriniva 03/25/97 - Add ANSI prototypes
* rwessman 03/19/97 - Added prototypes for nztific_FreeIdentityContent()
* asriniva 03/11/97 - Fix olint errors
* sdange 02/28/97 - Removed inclusion of nz0decl.h
* sdange 02/18/97 - Moved nzt specific declarations from nz0decl.h
* asriniva 01/21/97 - Remove prototypes.
* asriniva 10/31/96 - Include oratypes.h
* asriniva 10/15/96 - Declare buffer block helper functions
* asriniva 10/08/96 - First pass at wallet open/close
* asriniva 10/04/96 - Add random number seed function
* asriniva 10/03/96 - Reorder parameters in nztbbSetBlock
* asriniva 10/03/96 - Keep editing.
* asriniva 10/03/96 - Continued edits.
* asriniva 10/02/96 - Continue editing.
* asriniva 09/26/96 -
}
{ ENABLE check_long_lines }
{ ORATYPES }
{$include nzerror.inc} // NZ error type
{ NZERROR_ORACLE }
const
NZT_MAX_SHA1 = 20;
NZT_MAX_MD5 = 16;
{************************************* }
{ PUBLIC CONSTANTS, MACROS, AND TYPES }
{************************************* }
{
* Wallet Resource Locator Type Strings
*
* WRL TYPE PARAMETERS BEHAVIOR
* ======== ========== =====================================
* default: <none> Uses directory defined by the parameter
* SNZD_DEFAULT_FILE_DIRECTORY which in
* unix is "$HOME/oracle/oss"
*
* file: file path Find the Oracle wallet in this directory.
* example: file:<dir-path>
*
* sqlnet: <none> In this case, the directory path will be
* retrieved from the sqlnet.ora file under
* the oss.source.my_wallet parameter.
*
* mcs: <none> Microsoft WRL.
*
* entr: dir path Entrust WRL. eg: ENTR:<dir-path>
*
}
{ Note that there is no NZT_NULL_WRL. Instead look in snzd.h for DEFAULT_WRP
* which is used in our new defaulting mechanism. The NZT_DEFAULT_WRL
* should be deprecated.
}
const
NZT_DEFAULT_WRL:Ptext = 'default:';
NZT_SQLNET_WRL:Ptext ='sqlnet:';
NZT_FILE_WRL:Ptext='file:';
NZT_ENTR_WRL:Ptext='entr:';
NZT_MCS_WRL:Ptext='mcs:';
NZT_ORACLE_WRL:Ptext='oracle:';
NZT_REGISTRY_WRL:Ptext='reg:';
{ Default, use SNZD_DEFAULT_FILE_DIRECTORY }
{ Use oss.source.my_wallet in sqlnet.ora file }
{ Find the oracle wallet in this directory }
{ Find the entrust profile in this directory }
{ WRL for Microsoft }
{ Get the wallet from OSS db }
{ New SSO defaulting mechanism }
{ Find the wallet in Windows Registry }
type
nzttwrl = (NZTTWRL_DEFAULT := 1,NZTTWRL_SQLNET,
NZTTWRL_FILE,NZTTWRL_ENTR,NZTTWRL_MCS,
NZTTWRL_ORACLE,NZTTWRL_NULL,NZTTWRL_REGISTRY
);
Pnzttwrl = ^nzttwrl;
{$ifndef NZ0DECL_ORACLE}
{
* With the elimination of nz0decl.h from public, we need this
* redundant typedef.
}
{$endif}
{ NZ0DECL_ORACLE }
{ Moved from nz0decl.h }
type
PnzttIdentityPrivate = pointer;
PnzttPersonaPrivate = pointer;
PnzttWalletPrivate = pointer;
PnzttWalletObj = pointer; // For wallet object
PnzssEntry = pointer; // For secretstore
Pnzpkcs11_Info = pointer;
{
* Crypto Engine State
*
* Once the crypto engine (CE) has been initialized for a particular
* cipher, it is either at the initial state, or it is continuing to
* use the cipher. NZTCES_END is used to change the state back to
* initialized and flush any remaining output. NZTTCES_RESET can be
* used to change the state back to initialized and throw away any
* remaining output.
}
{ Continue processing input }
{ End processing input }
{ Reset processing and skip generating output }
nzttces = (NZTTCES_CONTINUE := 1,NZTTCES_END,NZTTCES_RESET
);
Pnzttces = ^nzttces;
{
* Crypto Engine Functions
*
* List of crypto engine categories; used to index into protection
* vector.
}
{ Signature, detached from content }
{ Signature combined with content }
{ Signature and encryption with content }
{ Encryption for one or more recipients }
{ Symmetric encryption }
{ Keyed hash/checkusm }
{ Hash/checsum }
{ Random byte generation }
{ Used for array size }
nzttcef = (NZTTCEF_DETACHEDSIGNATURE := 1,NZTTCEF_SIGNATURE,
NZTTCEF_ENVELOPING,NZTTCEF_PKENCRYPTION,
NZTTCEF_ENCRYPTION,NZTTCEF_KEYEDHASH,
NZTTCEF_HASH,NZTTCEF_RANDOM,NZTTCEF_LAST
);
Pnzttcef = ^nzttcef;
{
* State of the persona.
}
{ is not in any state(senseless???) }
{ cert-request }
{ certificate }
{ certificate }
{ renewal-requested }
nzttState = (NZTTSTATE_EMPTY := 0,NZTTSTATE_REQUESTED,
NZTTSTATE_READY,NZTTSTATE_INVALID,NZTTSTATE_RENEWAL
);
PnzttState = ^nzttState;
{
* Cert-version types
*
* This is used to quickly look-up the cert-type
}
{ X.509v1 }
{ X.509v3 }
{$ifdef NZDEPRECATED}
{ Symmetric }
{$endif}
{ For Initialization }
type
nzttVersion = (NZTTVERSION_X509v1 := 1,NZTTVERSION_X509v3,
NZTTVERSION_SYMMETRIC,NZTTVERSION_INVALID_TYPE
);
PnzttVersion = ^nzttVersion;
{
* Cipher Types
*
* List of all cryptographic algorithms, some of which may not be
* available.
}
{ RSA public key }
{ DES }
{ RC4 }
{ DES encrypted MD5 with salt (PBE) }
{ RC2 encrypted MD5 with salt (PBE) }
{ MD5 }
{ SHA }
nzttCipherType = (NZTTCIPHERTYPE_RSA := 1,NZTTCIPHERTYPE_DES,
NZTTCIPHERTYPE_RC4,NZTTCIPHERTYPE_MD5DES,
NZTTCIPHERTYPE_MD5RC2,NZTTCIPHERTYPE_MD5,
NZTTCIPHERTYPE_SHA);
PnzttCipherType = ^nzttCipherType;
{
* TDU Formats
*
* List of possible toolkit data unit (TDU) formats. Depending on the
* function and cipher used some may be not be available.
}
{ PKCS7 format }
{ RSA padded format }
{ Oracle v1 format }
{ Used for array size }
nztttdufmt = (NZTTTDUFMT_PKCS7 := 1,NZTTTDUFMT_RSAPAD,
NZTTTDUFMT_ORACLEv1,NZTTTDUFMT_LAST
);
Pnztttdufmt = ^nztttdufmt;
{
* Validate State
*
* Possible validation states an identity can be in.
}
{ Needs to be validated }
{ Validated }
{ Failed to validate }
nzttValState = (NZTTVALSTATE_NONE := 1,NZTTVALSTATE_GOOD,
NZTTVALSTATE_REVOKED);
PnzttValState = ^nzttValState;
{
* Policy Fields <----NEW (09/14/98)
*
* Policies enforced
}
{ number of retries for decryption = 1 }
{ number of retries for decryption = 2 }
{ number of retries for decryption = 3 }
nzttPolicy = (NZTTPOLICY_NONE := 0,NZTTPOLICY_RETRY_1,
NZTTPOLICY_RETRY_2,NZTTPOLICY_RETRY_3
);
PnzttPolicy = ^nzttPolicy;
{
* Persona Usage <----NEW (09/14/98)
*
* what a persona will be used for?
}
{ $ifdef NZDEPRECATED_MULTIPLECERTS}
{ persona for SSL usage }
type
nzttUsage = (NZTTUSAGE_NONE := 0,NZTTUSAGE_SSL);
PnzttUsage = ^nzttUsage;
// nzttUsage = nzttUsage;
{ $endif}
{
* Personas and identities have unique id's that are represented with
* 128 bits.
}
type
PnzttID = ^nzttID;
nzttID = ub1;
{
* Identity Types
*
* List of all Identity types..
}
nzttIdentType = (NZTTIDENTITYTYPE_INVALID_TYPE := 0,
NZTTIDENTITYTYPE_CERTIFICTAE,NZTTIDENTITYTYPE_CERT_REQ,
NZTTIDENTITYTYPE_RENEW_CERT_REQ,NZTTIDENTITYTYPE_CLEAR_ETP,
NZTTIDENTITYTYPE_CLEAR_UTP,NZTTIDENTITYTYPE_CLEAR_PTP
);
PnzttIdentType = ^nzttIdentType;
PnzttKPUsage = ^nzttKPUsage;
nzttKPUsage = ub4;
{ IF new types are added nztiMUS should be changed }
const
NZTTKPUSAGE_NONE = 0;
{ SSL Server }
NZTTKPUSAGE_SSL = 1;
NZTTKPUSAGE_SMIME_ENCR = 2;
NZTTKPUSAGE_SMIME_SIGN = 4;
NZTTKPUSAGE_CODE_SIGN = 8;
NZTTKPUSAGE_CERT_SIGN = 16;
{ SSL Client }
NZTTKPUSAGE_SSL_CLIENT = 32;
NZTTKPUSAGE_INVALID_USE = $ffff;
{
* Timestamp as 32 bit quantity in UTC.
}
type
PnzttTStamp = ^nzttTStamp;
nzttTStamp = ub1;
{
* Buffer Block
*
* A function that needs to fill (and possibly grow) an output buffer
* uses an output parameter block to describe each buffer.
*
* The flags_nzttBufferBlock member tells the function whether the
* buffer can be grown or not. If flags_nzttBufferBlock is 0, then
* the buffer will be realloc'ed automatically.
*
* The buflen_nzttBufferBLock member is set to the length of the
* buffer before the function is called and will be the length of the
* buffer when the function is finished. If buflen_nzttBufferBlock is
* 0, then the initial pointer stored in pobj_nzttBufferBlock is
* ignored.
*
* The objlen_nzttBufferBlock member is set to the length of the
* object stored in the buffer when the function is finished. If the
* initial buffer had a non-0 length, then it is possible that the
* object length is shorter than the buffer length.
*
* The pobj_nzttBufferBlock member is a pointer to the output object.
}
{ # define NZT_NO_AUTO_REALLOC 0x1 }
{ Flags }
{ Total length of buffer }
{ Length of used buffer part }
{ Pointer to buffer }
PnzttBufferBlock = ^nzttBufferBlock;
nzttBufferBlock = record
flags_nzttBufferBlock : uword;
buflen_nzttBufferBlock : ub4;
usedlen_nzttBufferBlock : ub4;
buffer_nzttBufferBlock : Pub1;
end;
{
* Wallet.
}
{ user's LDAP Name }
{ len of user's LDAP Name }
{ secured-policy of the wallet }
{ open-policy of the wallet }
{ List of personas in wallet }
{ Private wallet information }
{$ifdef NZDEPRECATED}
{ Number of personas }
{$endif}
type
PnzttPersona = ^nzttPersona;
PnzttWallet = ^nzttWallet;
PnzttIdentity = ^nzttIdentity;
nzttWallet = record
ldapName_nzttWallet : Pub1;
ldapNamelen_nzttWallet : ub4;
securePolicy_nzttWallet : nzttPolicy;
openPolicy_nzttWallet : nzttPolicy;
persona_nzttWallet : PnzttPersona;
private_nzttWallet : PnzttWalletPrivate;
npersona_nzttWallet : ub4;
end;
{
* The wallet contains, one or more personas. A persona always
* contains its private key and its identity. It may also contain
* other 3rd party identites. All identities qualified with trust
* where the qualifier can indicate anything from untrusted to trusted
* for specific operations.
}
{
* Persona
*
* Structure containing information about a persona.
}
{ user-friendly persona name }
{ persona-name length }
{ Opaque part of persona }
{ My cert-requests }
{ My certificates }
{ List of trusted identities }
{ List of secrets }
{ PKCS11 token info }
{ Next persona }
{$ifdef NZDEPRECATED_MULTIPLECERTS}
{ As Persona has multiple certs for different
usages, Persona Usage does not mean anything. Similarly
each key pair has its own state and Persona state itself
does not mean anything. - lk 5/31/00
}
{ persona usage; SSL/SET/.. }
{ persona state-requested/ready }
{ Num of trusted identities }
{$endif}
nzttPersona = record
genericName_nzttPersona : Pub1;
genericNamelen_nzttPersona : ub4;
private_nzttPersona : PnzttPersonaPrivate;
mycertreqs_nzttPersona : PnzttIdentity;
mycerts_nzttPersona : PnzttIdentity;
mytps_nzttPersona : PnzttIdentity;
mystore_nzttPersona : PnzssEntry;
mypkcs11Info_nzttPersona : Pnzpkcs11_Info;
next_nzttPersona : PnzttPersona;
usage_nzttPersona : nzttUsage;
state_nzttPersona : nzttState;
ntps_nzttPersona : ub4;
end;
{
* Identity
*
* Structure containing information about an identity.
*
* NOTE
* -- the next_trustpoint field only applies to trusted identities and
* has no meaning (i.e. is NULL) for self identities.
}
{ Alias }
{ Length of alias }
{ Comment }
{ Length of comment }
{ Opaque part of identity }
{ next identity in list }
nzttIdentity = record
dn_nzttIdentity : Ptext;
dnlen_nzttIdentity : ub4;
comment_nzttIdentity : Ptext;
commentlen_nzttIdentity : ub4;
private_nzttIdentity : PnzttIdentityPrivate;
next_nzttIdentity : PnzttIdentity;
end;
PnzttB64Cert = ^nzttB64Cert;
nzttB64Cert = record
b64Cert_nzttB64Cert : Pub1;
b64Certlen_nzttB64Cert : ub4;
next_nzttB64Cert : PnzttB64Cert;
end;
{ Hash cipher }
{ Symmetric cipher }
{ Length of key to use }
PnzttPKCS7ProtInfo = ^nzttPKCS7ProtInfo;
nzttPKCS7ProtInfo = record
mictype_nzttPKCS7ProtInfo : nzttCipherType;
symmtype_nzttPKCS7ProtInfo : nzttCipherType;
keylen_nzttPKCS7ProtInfo : ub4;
end;
{
* Protection Information.
*
* Information specific to a type of protection.
}
PnzttProtInfo = ^nzttProtInfo;
nzttProtInfo = record
case longint of
0 : ( pkcs7_nzttProtInfo : nzttPKCS7ProtInfo );
end;
{
* A description of a persona so that the toolkit can create one. A
* persona can be symmetric or asymmetric and both contain an
* identity. The identity for an asymmetric persona will be the
* certificate and the identity for the symmetric persona will be
* descriptive information about the persona. In either case, an
* identity will have been created before the persona is created.
*
* A persona can be stored separately from the wallet that references
* it. By default, a persona is stored with the wallet (it inherits
* with WRL used to open the wallet). If a WRL is specified, then it
* is used to store the actuall persona and the wallet will have a
* reference to it.
}
{ Length of private info (key) }
{ Private information }
{ Length of PRL }
{ PRL for storage }
{ Length of alias }
{ Alias }
{ Length of longer description }
{ Longer persona description }
PnzttPersonaDesc = ^nzttPersonaDesc;
nzttPersonaDesc = record
privlen_nzttPersonaDesc : ub4;
priv_nzttPersonaDesc : Pub1;
prllen_nzttPersonaDesc : ub4;
prl_nzttPersonaDesc : Ptext;
aliaslen_nzttPersonaDesc : ub4;
alias_nzttPersonaDesc : Ptext;
longlen_nzttPersonaDesc : ub4;
long_nzttPersonaDesc : Ptext;
end;
{
* A description of an identity so that the toolkit can create one.
* Since an identity can be symmetric or asymmetric, the asymmetric
* identity information will not be used when a symmetric identity is
* created. This means the publen_nzttIdentityDesc and
* pub_nzttIdentityDesc members will not be used when creating a
* symmetric identity.
}
{ Length of identity }
{ Type specific identity }
{ Length of alias }
{ Alias }
{ Length of longer description }
{ Longer description }
{ Length of trust qualifier }
{ Trust qualifier }
PnzttIdentityDesc = ^nzttIdentityDesc;
nzttIdentityDesc = record
publen_nzttIdentityDesc : ub4;
pub_nzttIdentityDesc : Pub1;
dnlen_nzttIdentityDesc : ub4;
dn_nzttIdentityDesc : Ptext;
longlen_nzttIdentityDesc : ub4;
long_nzttIdentityDesc : Ptext;
quallen_nzttIdentityDesc : ub4;
trustqual_nzttIdentityDesc : Ptext;
end;
{****************************** }
{ PUBLIC FUNCTION DECLARATIONS }
{****************************** }
{---------------------- nztwOpenWallet ---------------------- }
{
* NAME
* nztwOpenWallet - Open a wallet based on a wallet Resource Locator (WRL).
*
* PARAMETERS
* osscntxt IN OSS context.
* wrllen IN Length of WRL.
* wrl IN WRL.
* pwdlen IN Length of password.
* pwd IN Password.
* wallet IN/OUT Initialized wallet structure.
*
* NOTES
* The syntax for a WRL is <Wallet Type>:<Wallet Type Parameters>.
*
* Wallet Type Wallet Type Parameters.
* ----------- ----------------------
* File Pathname (e.g. "file:/home/asriniva")
* Oracle Connect string (e.g. "oracle:scott/tiger@oss")
*
* There are also defaults. If the WRL is NZT_DEFAULT_WRL, then
* the platform specific WRL default is used. If only the wallet
* type is specified, then the WRL type specific default is used
* (e.g. "oracle:")
*
* There is an implication with Oracle that should be stated: An
* Oracle based wallet can be implemented in a user's private space
* or in world readable space.
*
* When the wallet is opened, the password is verified by hashing
* it and comparing against the password hash stored with the
* wallet. The list of personas (and their associated identities)
* is built and stored into the wallet structure.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_RIO_OPEN RIO could not open wallet (see network trace file).
* NZERROR_TK_PASSWORD Password verification failed.
* NZERROR_TK_WRLTYPE WRL type is not known.
* NZERROR_TK_WRLPARM WRL parm does not match type.
}
{$IFNDEF LinkDynamically}
function nztwOpenWallet(_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
_para6:PnzttWallet):nzerror;cdecl;external ocilib name 'nztwOpenWallet';
{$ELSE}
var nztwOpenWallet : function (_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
_para6:PnzttWallet):nzerror;cdecl;
{$ENDIF}
{---------------------- nztwCloseWallet ---------------------- }
{
* NAME
* nztwCloseWallet - Close a wallet
*
* PARAMETERS
* osscntxt IN OSS context.
* wallet IN/OUT Wallet.
*
* NOTES
* Closing a wallet also closes all personas associated with that
* wallet. It does not cause a persona to automatically be saved
* if it has changed. The implication is that a persona can be
* modified by an application but if it is not explicitly saved it
* reverts back to what was in the wallet.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_RIO_CLOSE RIO could not close wallet (see network trace file).
}
{$IFNDEF LinkDynamically}
function nztwCloseWallet(_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;external ocilib name 'nztwCloseWallet';
{$ELSE}
nztwCloseWallet : function (_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;
{$ENDIF}
{--------------------nztwGetCertInfo---------------------------- }
{***NOTE: This function is a temporary hack.*** }
{***DO NOT CALL. It will soon disappear.*** }
{_ nzctx *nz_context,
nzosContext *nzosCtx,
nzttWallet *walletRef,
void *peerCert _ }(* error
void *peerCert _*/);
in declarator_list *)
{------------------------ nztwConstructWallet ----------------------- }
{
*
* nzerror nztwConstructWallet( nzctx *oss_context,
* nzttPolicy openPolicy,
* nzttPolicy securePolicy,
* ub1 *ldapName,
* ub4 ldapNamelen,
* nzstrc *wrl,
* nzttPersona *personas,
* nzttWallet **wallet );
}
{---------------------- nztwRetrievePersonaCopy ---------------------- }
{
* NAME
* nztwRetrievePersonaCopy - Retrieves a persona based from wallet
*
* PARAMETERS
* osscntxt IN OSS context.
* wallet IN Wallet.
* index IN Which wallet index to remove (first persona is zero).
* persona OUT Persona found.
*
* NOTES
* Retrieves a persona from the wallet based on the index number passed
* in. This persona is a COPY of the one stored in the wallet, therefore
* it is perfectly fine for the wallet to be closed after this call is
* made.
*
* The caller is responsible for disposing of the persona when completed.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztwRetrievePersonaCopy(_para1:Pnzctx; _para2:PnzttWallet; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;external ocilib name 'nztwRetrievePersonaCopy';
{$ELSE}
nztwRetrievePersonaCopy : function (_para1:Pnzctx; _para2:PnzttWallet; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;
{$ENDIF}
{---------------------- nztwRetrievePersonaCopyByName ---------------------- }
{
* NAME
* nztwRetrievePersonaCopyByName - Retrieves a persona based on its name.
*
* PARAMETERS
* osscntxt IN OSS context.
* wallet IN Wallet.
* name IN Name of the persona
* persona OUT Persona found.
*
* NOTES
* Retrieves a persona from the wallet based on the name of the persona.
* This persona is a COPY of the one stored in the wallet, therefore
* it is perfectly fine for the wallet to be closed after this call is
* made.
*
* The caller is responsible for disposing of the persona when completed.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztwRetrievePersonaCopyByName(_para1:Pnzctx; _para2:PnzttWallet; _para3:Pchar; _para4:PPnzttPersona):nzerror;cdecl;external ocilib name 'nztwRetrievePersonaCopyByName';
{$ELSE}
nztwRetrievePersonaCopyByName : function (_para1:Pnzctx; _para2:PnzttWallet; _para3:Pchar; _para4:PPnzttPersona):nzerror;cdecl;
{$ENDIF}
{---------------------- nzteOpenPersona ---------------------- }
{
* NAME
* nzteOpenPersona - Open a persona.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN/OUT Persona.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_PASSWORD Password failed to decrypt persona.
* NZERROR_TK_BADPRL Persona resource locator did not work.
* NZERROR_RIO_OPEN Could not open persona (see network trace file).
}
{$IFNDEF LinkDynamically}
function nzteOpenPersona(_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;external ocilib name 'nzteOpenPersona';
{$ELSE}
nzteOpenPersona : function (_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;
{$ENDIF}
{--------------------- nzteClosePersona --------------------- }
{
* NAME
* nzteClosePersona - Close a persona.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN/OUT Persona.
*
* NOTES
* Closing a persona does not store the persona, it simply releases
* the memory associated with the crypto engine.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nzteClosePersona(_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;external ocilib name 'nzteClosePersona';
{$ELSE}
nzteClosePersona : function (_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;
{$ENDIF}
{--------------------- nzteDestroyPersona --------------------- }
{
* NAME
* nzteDestroyPersona - Destroy a persona.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN/OUT Persona.
*
* NOTES
* The persona is destroyd in the open state, but it will
* not be associated with a wallet.
*
* The persona parameter is doubly indirect so that at the
* conclusion of the function, the pointer can be set to NULL.
*
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_TYPE Unsupported itype/ctype combination.
* NZERROR_TK_PARMS Error in persona description.
}
{$IFNDEF LinkDynamically}
function nzteDestroyPersona(_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteDestroyPersona';
{$ELSE}
nzteDestroyPersona : function (_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;
{$ENDIF}
{---------------------- nzteRetrieveTrustedIdentCopy ---------------------- }
{
* NAME
* nzteRetrieveTrustedIdentCopy - Retrieves a trusted identity from persona
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* index IN Which wallet index to remove (first element is zero).
* identity OUT Trusted Identity from this persona.
*
* NOTES
* Retrieves a trusted identity from the persona based on the index
* number passed in. This identity is a COPY of the one stored in
* the persona, therefore it is perfectly fine to close the persona
* after this call is made.
*
* The caller is responsible for freeing the memory of this object
* by calling nztiAbortIdentity it is no longer needed
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nzteRetrieveTrustedIdentCopy(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nzteRetrieveTrustedIdentCopy';
{$ELSE}
nzteRetrieveTrustedIdentCopy : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{--------------------- nztePriKey --------------------- }
{
* NAME
* nztePriKey - Get the decrypted Private Key for the Persona
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* vkey OUT Private Key [B_KEY_OBJ]
* vkey_len OUT Private Key Length
*
* NOTES
* This funiction will only work for X.509 based persona which contain
* a private key.
* A copy of the private key is returned to the caller so that they do not
* have to worry about the key changeing "underneath them".
* Memory will be allocated for the vkey and therefore, the CALLER
* will be responsible for freeing this memory.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_NO_MEMORY ossctx is null.
* NZERROR_TK_BADPRL Persona resource locator did not work.
}
{$IFNDEF LinkDynamically}
function nztePriKey(_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztePriKey';
{$ELSE}
nztePriKey : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
{$ENDIF}
{--------------------- nzteMyCert --------------------- }
{
* NAME
* nzteMyCert - Get the X.509 Certificate for a persona
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* cert OUT X.509 Certificate [BER encoded]
* cert_len OUT Certificate length
*
* NOTES
* This funiction will only work for X.509 based persona which contain
* a certificate for the self identity.
* A copy of the certificate is returned to the caller so that they do not
* have to worry about the certificate changeing "underneath them".
* Memory will be allocated for the cert and therefore, the CALLER
* will be responsible for freeing this memory.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_NO_MEMORY ossctx is null.
}
{$IFNDEF LinkDynamically}
function nzteMyCert(_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nzteMyCert';
{$ELSE}
nzteMyCert : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
{$ENDIF}
{--------------------- nzteX509CreatePersona --------------------- }
{
* NAME
* nzteX509CreatePersona - Given a BER X.509 cert, create a persona
*
* PARAMETERS
* osscntxt IN OSS context.
* cert IN X.509 Certificate [BER encoded]
* cert_len IN Certificate length
* persona OUT Persona.
*
* NOTES
* Memory will be allocated for the persona and therefore, the CALLER
* will be responsible for freeing this memory.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_NO_MEMORY ossctx is null.
}
{$IFNDEF LinkDynamically}
function nzteX509CreatePersona(_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteX509CreatePersona';
{$ELSE}
nzteX509CreatePersona : function (_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;
{$ENDIF}
{-------------------- nztiCreateIdentity -------------------- }
{
* NAME
* nztiCreateIdentity - Create an identity.
*
* PARAMETERS
* osscntxt IN OSS context.
* itype IN Identity type.
* desc IN Description of identity.
* identity IN/OUT Identity.
*
* NOTES
* Memory is only allocated for the identity structure. The elements in
* the description struct are not copied. Rather their pointers are copied
* into the identity structure. Therefore, the caller should not free
* the elements referenced by the desc. These elements will be freed
* when the nztiDestroyIdentity is called.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_PARMS Error in description.
}
{$IFNDEF LinkDynamically}
function nztiCreateIdentity(_para1:Pnzctx; _para2:nzttVersion; _para3:PnzttIdentityDesc; _para4:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiCreateIdentity';
{$ELSE}
nztiCreateIdentity : function (_para1:Pnzctx; _para2:nzttVersion; _para3:PnzttIdentityDesc; _para4:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{$ifdef NZ_OLD_TOOLS}
{-------------------- nztiDuplicateIdentity -------------------- }
{
* NAME
* nztiDuplicateIdentity - Duplicate an identity.
*
* PARAMETERS
* osscntxt IN OSS context.
* identity IN Target Identity.
* new_identity IN New Identity.
*
* NOTES
* Memory for the identity is allocated inside the function, and all
* internal identity elements as well.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTFOUND Identity not found.
* NZERROR_PARMS Error in description.
}
{$IFNDEF LinkDynamically}
function nztiDuplicateIdentity(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiDuplicateIdentity';
{$ELSE}
nztiDuplicateIdentity : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{$endif}
{ NZ_OLD_TOOLS }
{--------------------- nztiAbortIdentity --------------------- }
{
* NAME
* nztiAbortIdentity - Abort an unassociated identity.
*
* PARAMETERS
* osscntxt IN OSS context.
* identity IN/OUT Identity.
*
* NOTES
* It is an error to try to abort an identity that can be
* referenced through a persona.
*
* The identity pointer is set to NULL at the conclusion.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_CANTABORT Identity is associated with persona.
}
{$IFNDEF LinkDynamically}
function nztiAbortIdentity(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiAbortIdentity';
{$ELSE}
nztiAbortIdentity : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{$ifdef NZ_OLD_TOOLS}
{----------------- nztidGetIdentityDesc ----------------- }
{
* NAME
* nztidGetIdentityDesc - Gets an Identity Description from the identity
*
* PARAMETERS
* osscntxt IN Success.
* identity IN Identity.
* description IN/OUT Identity Description.
*
* NOTES
* Memory is allocated for the Identity Description. It
* is the callers responsibility to free this memory by calling
* nztiFreeIdentityDesc.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztidGetIdentityDesc(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentityDesc):nzerror;cdecl;external ocilib name 'nztidGetIdentityDesc';
{$ELSE}
nztidGetIdentityDesc : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentityDesc):nzerror;cdecl;
{$ENDIF}
{----------------- nztidFreeIdentityDesc ----------------- }
{
* NAME
* nztidFreeIdentityDesc - Frees memory for Identity Desc object.
*
* PARAMETERS
* osscntxt IN oss context.
* description IN/OUT Identity Description.
*
* NOTES
* Memory is freed for all Identity description elements. Pointer is
* then set to null.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztidFreeIdentityDesc(_para1:Pnzctx; _para2:PPnzttIdentityDesc):nzerror;cdecl;external ocilib name 'nztidFreeIdentityDesc';
{$ELSE}
nztidFreeIdentityDesc : fucntion (_para1:Pnzctx; _para2:PPnzttIdentityDesc):nzerror;cdecl;
{$ENDIF}
{$endif}
{ NZ_OLD_TOOLS }
{---------------- nztific_FreeIdentityContent ---------------- }
{
* NAME
* nztific_FreeIdentityContent - free the contents of an identity.
*
* PARAMETERS
* osscntxt IN OSS context.
* identity IN/OUT freed identity
*
* NOTES
* Free a created identity.
*
* RETURNS
* NZERROR_OK Success.
}
{
* Free the identity content.
}
{$IFNDEF LinkDynamically}
function nztific_FreeIdentityContent(ossctx:Pnzctx; identity:PnzttIdentity):nzerror;cdecl;external ocilib name 'nztific_FreeIdentityContent';
{$ELSE}
nztific_FreeIdentityContent : function (ossctx:Pnzctx; identity:PnzttIdentity):nzerror;cdecl;
{$ENDIF}
{-------------------------- nztSign -------------------------- }
{
* NAME
* nztSign - Create an attached signature.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Open persona acting as signer.
* state IN State of signature.
* inlen IN Length of this input part.
* in IN This input part.
* tdubuf IN/OUT TDU buffer.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow output buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztSign(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztSign';
{$ELSE}
nztSign : function(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{------------------------- nztVerify ------------------------- }
{
* NAME
* nztVerify - Verify an attached signature.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* state IN State of verification.
* intdulen IN TDU length.
* intdu IN TDU.
* out IN/OUT Extracted message.
* verified OUT TRUE if signature verified.
* validatedOUT TRUE if signing identity validated.
* identity OUT Identity of signing party.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow outptu buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztVerify(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztVerify';
{$ELSE}
nztVerify : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{------------------------ nztValidate ------------------------ }
{
* NAME
* nztValidate - Validate an identity.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* identity IN Identity.
* validatedOUT TRUE if identity was validated.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztValidate(_para1:Pnzctx; _para2:PnzttPersona; _para3:PnzttIdentity; _para4:Pboolean):nzerror;cdecl;external ocilib name 'nztValidate';
{$ELSE}
nztValidate : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PnzttIdentity; _para4:Pboolean):nzerror;cdecl;
{$ENDIF}
{-------------------- nztsd_SignDetached -------------------- }
{
* NAME
* nztsd_SignDetached - Generate a detached signature.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* state IN State of signature.
* inlen IN Length of this input part.
* in IN This input part.
* tdubuf IN/OUT TDU buffer.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow output buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztsd_SignDetached(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztsd_SignDetached';
{$ELSE}
nztsd_SignDetached : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{------------------- nztved_VerifyDetached ------------------- }
{
* NAME
* nztved_VerifyDetached - Verify a detached signature.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* state IN State of verification.
* inlen IN Length of data.
* in IN Data.
* intdulen IN Input TDU length.
* tdu IN Input TDU.
* verified OUT TRUE if signature verified.
* validatedOUT TRUE if signing identity validated.
* identity OUT Identity of signing party.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztved_VerifyDetached(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:ub4; _para7:Pub1; _para8:Pboolean; _para9:Pboolean; _para10:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztved_VerifyDetached';
{$ELSE}
nztved_VerifyDetached : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:ub4; _para7:Pub1; _para8:Pboolean; _para9:Pboolean; _para10:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{--------------------- nztkec_PKEncrypt --------------------- }
{
* NAME
* nztkec_PKEncrypt - Encrypt data symmetrically, encrypt key asymmetrically
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* nrecipients IN Number of recipients for this encryption.
* recipients IN List of recipients.
* state IN State of encryption.
* inlen IN Length of this input part.
* in IN This input part.
* tdubuf IN/OUT TDU buffer.
*
* NOTES
* There is a limitation of 1 recipient (nrecipients = 1) at this
* time.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow output buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztkec_PKEncrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
_para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztkec_PKEncrypt';
{$ELSE}
nztkec_PKEncrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
_para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{---------------- nztxkec_PKEncryptExpansion ---------------- }
{
* NAME
* nztxkec_PKEncryptExpansion - Determine the buffer needed for PKEncrypt
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* nrecipients IN Number of recipients.
* inlen IN Length of input.
* tdulen out Length of buffer need.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztxkec_PKEncryptExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:ub4; _para5:Pub4):nzerror;cdecl;external ocilib name 'nztxkec_PKEncryptExpansion';
{$ELSE}
nztxkec_PKEncryptExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:ub4; _para5:Pub4):nzerror;cdecl;
{$ENDIF}
{--------------------- nztkdc_PKDecrypt --------------------- }
{
* NAME
* nztkdc_PKDecrypt - Decrypt a PKEncrypted message.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* state IN State of encryption.
* inlen IN Length of this input part.
* in IN This input part.
* tdubuf IN/OUT TDU buffer.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow output buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztkdc_PKDecrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztkdc_PKDecrypt';
{$ELSE}
nztkdc_PKDecrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{-------------------------- nztHash -------------------------- }
{
* NAME
* nztHash - Generate a hash.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* state IN State of hash.
* inlen IN Length of this input.
* in IN This input.
* tdu IN/OUT Output tdu.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztHash(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztHash';
{$ELSE}
nztHash : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{----------------------- nztSeedRandom ----------------------- }
{
* NAME
* nztSeedRandom - Seed the random function
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* seedlen IN Length of seed.
* seed IN Seed.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztSeedRandom(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub1):nzerror;cdecl;external ocilib name 'nztSeedRandom';
{$ELSE}
nztSeedRandom : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub1):nzerror;cdecl;
{$ENDIF}
{--------------------- nztrb_RandomBytes --------------------- }
{
* NAME
* nztrb_RandomBytes - Generate a buffer random bytes.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* nbytes IN Number of bytes desired.
* out IN/OUT Buffer block for bytes.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztrb_RandomBytes(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztrb_RandomBytes';
{$ELSE}
nztrb_RandomBytes : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{-------------------- nztrn_RandomNumber -------------------- }
{
* NAME
* nztrn_RandomNumber - Generate a random number
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* num OUT Number.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztrn_RandomNumber(_para1:Pnzctx; _para2:PnzttPersona; _para3:Puword):nzerror;cdecl;external ocilib name 'nztrn_RandomNumber';
{$ELSE}
nztrn_RandomNumber : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:Puword):nzerror;cdecl;
{$ENDIF}
{---------------------- nztbbInitBlock ---------------------- }
{
* NAME
* nztbbInitBlock - Initialize a buffer block.
*
* PARAMETERS
* osscntxt IN OSS context.
* block IN/OUT Buffer block.
*
* NOTES
* The buffer block is initialized to be empty (all members are set
* to 0/NULL). Such a block will be allocated memory as needed.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztbbInitBlock(_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbInitBlock';
{$ELSE}
nztbbInitBlock : function (_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{---------------------- nztbbReuseBlock ---------------------- }
{
* NAME
* nztbbReuseBlock - Reuse an already initialized and possibly used block.
*
* PARAMETERS
* osscntxt IN OSS context.
* block IN/OUT Buffer block.
*
* NOTES
* This function simply sets the used length member of the buffer
* block to 0. If the block already has memory allocated to it,
* this will cause it to be reused.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztbbReuseBlock(_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbReuseBlock';
{$ELSE}
nztbbReuseBlock : function (_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{---------------------- nztbbSizeBlock ---------------------- }
{
* NAME
* nztbbSizeBlock - Size an initialized block to a particular size.
*
* PARAMETERS
* osscntxt IN OSS context.
* len IN Minimum number of unused bytes desired.
* block IN/OUT Buffer block.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztbbSizeBlock(_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbSizeBlock';
{$ELSE}
nztbbSizeBlock : function (_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{----------------------- nztbbGrowBlock ----------------------- }
{
* NAME
* nzbbGrowBlock - Increase the size of the buffer block.
*
* PARAMETERS
* osscntxt IN OSS context.
* inc IN Number of bytes to increase.
* block IN/OUT Buffer block.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztbbGrowBlock(_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbGrowBlock';
{$ELSE}
nztbbGrowBlock : function (_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{---------------------- nztbbPurgeBlock ---------------------- }
{
* NAME
* nztbbPurgeBlock - Purge a buffer block of its memory.
*
* PARAMETERS
* osscntxt IN OSS context.
* block IN/OUT Buffer block.
*
* NOTES
* The memory used by the buffer block as the buffer is released.
* The buffer block itself is not affected.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztbbPurgeBlock(_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbPurgeBlock';
{$ELSE}
nztbbPurgeBlock : function (_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{----------------------- nztbbSetBlock ----------------------- }
{
* NAME
* nztbbSetBlock - Set a buffer block to a known state.
*
* PARAMETERS
* osscntxt IN OSS context.
* flags IN Flags to set.
* buflen IN Length of buffer.
* usedlen IN Used length.
* buffer IN Buffer.
* block IN/OUT Buffer block
*
* NOTES
* If buflen > 0, objlen == 0, and obj == NULL, then buflen bytes
* of memory is allocated and a pointer is stored in the buffer
* block.
*
* The buffer parameter remains unchanged.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztbbSetBlock(_para1:Pnzctx; _para2:uword; _para3:ub4; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbSetBlock';
{$ELSE}
nztbbSetBlock : function (_para1:Pnzctx; _para2:uword; _para3:ub4; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{--------------------- nztiGetSecInfo --------------------- }
{
* NAME
* nztiGetSecInfo - Get some security information for SSL
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* persona IN persona
* dname OUT distinguished name of the certificate
* dnamelen OUT length of the distinguished name
* issuername OUT issuer name of the certificate
* certhash OUT SHA1 hash of the certificate
* certhashlenOUT length of the hash
* NOTES
* This function allocate memories for issuername, certhash, and dname.
* To deallocate memory for those params, you should call nztdbuf_DestroyBuf.
* RETURNS
*
}
{$IFNDEF LinkDynamically}
function nztiGetSecInfo(_para1:Pnzctx; _para2:PnzttPersona; _para3:PPtext; _para4:Pub4; _para5:PPtext;
_para6:Pub4; _para7:PPub1; _para8:Pub4):nzerror;cdecl;external ocilib name 'nztiGetSecInfo';
{$ELSE}
nztiGetSecInfo : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PPtext; _para4:Pub4; _para5:PPtext;
_para6:Pub4; _para7:PPub1; _para8:Pub4):nzerror;cdecl;
{$ENDIF}
{---------------------- nztiGetDName ---------------------- }
{
* NAME
* nztiGetDName - Get the distinguished name for the given identity
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* identity IN identity need to get dname from
* dn OUT distinguished name
* dnlen OUT length of the dname
*
* NOTES
*
* RETURNS
*
}
{$IFNDEF LinkDynamically}
function nztiGetDName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztiGetDName';
{$ELSE}
nztiGetDName : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;
{$ENDIF}
{------------------- nztiGetIssuerName ------------------- }
{
* NAME
* nztiGetIssuerName - Get IssuerName for the given identity
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* identity IN identity need to get issuername from
* issuername OUT issuer's name
* issuernamelen OUT length of the issuer's name
*
* NOTES
*
* RETURNS
*
}
{$IFNDEF LinkDynamically}
function nztiGetIssuerName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztiGetIssuerName';
{$ELSE}
nztiGetIssuerName : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;
{$ENDIF}
{-------------------- nztgch_GetCertHash -------------------- }
{
* NAME
* nztgch_GetCertHash - Get SHA1 hash for the certificate of the identity
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* identity IN identity need to get issuername from
* certHash OUT certHash buffer
* hashLen OUT length of the certHash
*
* NOTES
* Need to call nztdbuf_DestroyBuf to deallocate memory for certHash.
* RETURNS
*
}
{$IFNDEF LinkDynamically}
function nztgch_GetCertHash(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztgch_GetCertHash';
{$ELSE}
nztgch_GetCertHash : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
{$ENDIF}
{-------------------- nztdbuf_DestroyBuf -------------------- }
{
* NAME
* nztdbuf_DestroyBuf - Deallocation funtions for ub1 and text buffer
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* buf IN Allocated buffer to be destroyed.
*
* NOTES
*
* RETURNS
*
}
{$IFNDEF LinkDynamically}
function nztdbuf_DestroyBuf(_para1:Pnzctx; _para2:PPdvoid):nzerror;cdecl;external ocilib name 'nztdbuf_DestroyBuf';
{$ELSE}
nztdbuf_DestroyBuf : function (_para1:Pnzctx; _para2:PPdvoid):nzerror;cdecl;
{$ENDIF}
{----------------------- nztGetCertChain ----------------------- }
{
* NAME
* nztGetCertChain -
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
*
* NOTES
*
* RETURNS
*
}
{$IFNDEF LinkDynamically}
function nztGetCertChain(_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;external ocilib name 'nztGetCertChain';
{$ELSE}
nztGetCertChain : function (_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;
{$ENDIF}
{----------------------- nztCompareDN ----------------------- }
{
* NAME
* nztCompareDN -
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* dn1 IN distinguished name 1
* dn2 IN distinguished name 2
*
* NOTES
*
* RETURNS
* NZERROR_OK succeeded
* others failed
*
}
{$IFNDEF LinkDynamically}
function nztCompareDN(_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:Pub1; _para5:ub4;
_para6:Pboolean):nzerror;cdecl;external ocilib name 'nztCompareDN';
{$ELSE}
nztCompareDN : function (_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:Pub1; _para5:ub4;
_para6:Pboolean):nzerror;cdecl;
{$ENDIF}
{$ifdef NZ_OLD_TOOLS}
{--------------------- nztIdentityAlloc --------------------- }
{
* NAME
* nztIdentityAlloc - Allocate memory for nzttIdentity context
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* identity OUT nzttIdentity context
*
* NOTES
*
* RETURNS
* NZERROR_OK succeeded
* others failed
*
}
{$IFNDEF LinkDynamically}
function nztIdentityAlloc(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztIdentityAlloc';
{$ELSE}
nztIdentityAlloc : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{--------------------- nztIPrivateAlloc --------------------- }
{
* NAME
* nztIPrivateAlloc - Allocate memory for nzttIdentityPrivate
*
* PARAMETERS
* Name IN/OUT Description
*
* osscntxt IN OSS context.
* ipriv OUT identityPrivate structure
* NOTES
*
* RETURNS
* NZERROR_OK succeeded
* others failed
*
}
{$IFNDEF LinkDynamically}
function nztIPrivateAlloc(_para1:Pnzctx; _para2:PPnzttIdentityPrivate):nzerror;cdecl;external ocilib name 'nztIPrivateAlloc';
{$ELSE}
nztIPrivateAlloc : function (_para1:Pnzctx; _para2:PPnzttIdentityPrivate):nzerror;cdecl;
{$ENDIF}
{---------------------- nztIDupContent ---------------------- }
{
* NAME
* nztIDupContent -
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* targetIdentityOUT target identity
* sourceIdentity IN source identity
* NOTES
*
* RETURNS
* NZERROR_OK succeeded
* others failed
*
}
{$IFNDEF LinkDynamically}
function nztIDupContent(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PnzttIdentity):nzerror;cdecl;external ocilib name 'nztIDupContent';
{$ELSE}
nztIDupContent : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PnzttIdentity):nzerror;cdecl;
{$ENDIF}
{---------------------- nztIPDuplicate ---------------------- }
{
* NAME
* nztIPDuplicate -
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* target_ipriv OUT target identityPrivate
* source_ipriv IN source identityPrivate
*
* NOTES
*
* RETURNS
* NZERROR_OK succeeded
* others failed
*
}
{$IFNDEF LinkDynamically}
function nztIPDuplicate(_para1:Pnzctx; _para2:PPnzttIdentityPrivate; _para3:PnzttIdentityPrivate):nzerror;cdecl;external ocilib name 'nztIPDuplicate';
{$ELSE}
nztIPDuplicate : function (_para1:Pnzctx; _para2:PPnzttIdentityPrivate; _para3:PnzttIdentityPrivate):nzerror;cdecl;
{$ENDIF}
{--------------------- nztiDupIdentList --------------------- }
{
* NAME
* nztiDupIdentList -
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* source_identities IN source identity list
* numIdent OUT number of identity in the list
* ppidentity OUT Target of identity
*
* NOTES
*
* RETURNS
* NZERROR_OK succeeded
* others failed
*
}
{$IFNDEF LinkDynamically}
function nztiDupIdentList(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiDupIdentList';
{$ELSE}
nztiDupIdentList : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{--------------------- nztFreeIdentList --------------------- }
{
* NAME
* nztFreeIdentList - Free memory for a list of Identities
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* identity IN identity context
*
* NOTES
*
* RETURNS
* NZERROR_OK succeeded
* others failed
*
}
{$IFNDEF LinkDynamically}
function nztFreeIdentList(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztFreeIdentList';
{$ELSE}
nztFreeIdentList : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{$endif}
{ NZ_OLD_TOOLS }
{--------------------- nztCheckVaLidity --------------------- }
{
* NAME
* nztCheckVaLidity - Check the validity of certificate
*
* PARAMETERS
* Name IN/OUT Description
* osscntxt IN OSS context.
* start_time Start time of the certificate
* end_time End time of the certificate
*
* NOTES
*
* RETURNS
* NZERROR_OK succeeded
* others failed
*
}
{$IFNDEF LinkDynamically}
function nztCheckValidity(_para1:Pnzctx; _para2:ub4; _para3:ub4):nzerror;cdecl;external ocilib name 'nztCheckValidity';
{$ELSE}
nztCheckValidity : function (_para1:Pnzctx; _para2:ub4; _para3:ub4):nzerror;cdecl;
{$ENDIF}
{--------------------- nztwCreateWallet --------------------- }
{
* NAME
* nztwCreateWallet - Create a new wallet.
*
* PARAMETERS
* osscntxt IN OSS context.
* wrllen IN Length of wallet resource locator.
* wrl IN WRL.
* pwdlen IN Length of password (see notes below).
* pwd IN Password.
* wallet IN/OUT Wallet.
*
* NOTES
* It is an error to try to create a wallet that already exists.
* The previously existing wallet must be destroyed first.
*
* The wallet itself is not encrypted. Rather, all the personas in
* the wallet are encrypted under the same password. A hash of the
* password is stored in the wallet.
*
* Upon success, an empty open wallet is stored in the wallet
* parameter.
*
* RETURNS
* NZERROR_OK Sucess.
* NZERROR_TK_WALLET_EXISTS Wallet already exists.
* NZERROR_RIO_OPEN RIO could not create wallet (see trace file).
}
{$IFNDEF LinkDynamically}
function nztwCreateWallet(_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
_para6:PnzttWallet):nzerror;cdecl;external ocilib name 'nztwCreateWallet';
{$ELSE}
nztwCreateWallet : function (_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
_para6:PnzttWallet):nzerror;cdecl;
{$ENDIF}
{--------------------- nztwDestroyWallet --------------------- }
{
* NAME
* nztwDestroyWallet - Destroy an existing wallet.
*
* PARAMETERS
* osscntxt IN OSS context.
* wrllen IN Length of wallet resource locator.
* wrl IN WRL.
* pwdlen IN Length of password.
* pwd IN Password.
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_PASSWORD Password verification failed.
* NZERROR_RIO_OPEN RIO could not open wallet (see trace file).
* NZERROR_RIO_DELETE Delete failed (see trace file).
}
{$IFNDEF LinkDynamically}
function nztwDestroyWallet(_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext):nzerror;cdecl;external ocilib name 'nztwDestroyWallet';
{$ELSE}
nztwDestroyWallet : function (_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext):nzerror;cdecl;
{$ENDIF}
{--------------------- nzteStorePersona --------------------- }
{
* NAME
* nzteStorePersona - Store an open persona in a wallet.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN/OUT Persona.
* wallet IN/OUT Wallet.
*
* NOTES
* If the open persona is not associated with any wallet (it was
* created via the nzteClosePersona function), then storing the
* persona creates that association. The wallet will also have an
* updated persona list that reflects this association.
*
* If the open persona was associated with wallet 'A' (it was
* opened via the nztwOpenWallet function), and is stored back into
* wallet 'A', then then the old persona is overwritten by the new
* persona if the password can be verified. Recall that all
* personas have a unique identity id. If that id changes then
* storing the persona will put a new persona in the wallet.
*
* If the open persona was associated with wallet 'A' and is stored
* into wallet 'B', and if wallet 'B' does not contain a persona
* with that unique identity id, then the persona will be copied
* into wallet 'B', wallet 'B''s persona list will be updated, and
* the persona structure will be updated to be associated with
* wallet 'B'. If wallet 'B' already contained the persona, it
* would be overwritten by the new persona.
*
* The persona parameter is doubly indirect so that at the
* conclusion of the function call, the pointer can be directed to
* the persona in the wallet.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_PASSWORD Password verification failed.
* NZERROR_RIO_STORE Store failed (see network trace file).
}
{$IFNDEF LinkDynamically}
function nzteStorePersona(_para1:Pnzctx; _para2:PPnzttPersona; _para3:PnzttWallet):nzerror;cdecl;external ocilib name 'nzteStorePersona';
{$ELSE}
nzteStorePersona : function (_para1:Pnzctx; _para2:PPnzttPersona; _para3:PnzttWallet):nzerror;cdecl;
{$ENDIF}
{--------------------- nzteRemovePersona --------------------- }
{
* NAME
* nzteRemovePersona - Remove a persona from the wallet.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN/OUT Persona.
*
* NOTES
* The password is verified before trying to remove the persona.
*
* If the persona is open, it is closed. The persona is removed
* from the wallet list and the persona pointer is set to NULL.
*
* A double indirect pointer to the persona is required so that the
* persona pointer can be set to NULL upon completion.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_PASSWORD Password verification failed.
* NZERROR_RIO_DELETE Delete failed.
}
{$IFNDEF LinkDynamically}
function nzteRemovePersona(_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteRemovePersona';
{$ELSE}
nzteRemovePersona : function (_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;
{$ENDIF}
{--------------------- nzteCreatePersona --------------------- }
{
* NAME
* nzteCreatePersona - Create a persona.
*
* PARAMETERS
* osscntxt IN OSS context.
* itype IN Identity type.
* ctype IN Cipher type.
* desc IN Persona description.
* persona OUT Persona.
*
* NOTES
* The resulting persona is created in the open state, but it will
* not be associated with a wallet.
*
* The memory for the persona is allocated by the function.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_TYPE Unsupported itype/ctype combination.
* NZERROR_TK_PARMS Error in persona description.
}
{$IFNDEF LinkDynamically}
function nzteCreatePersona(_para1:Pnzctx; _para2:nzttVersion; _para3:nzttCipherType; _para4:PnzttPersonaDesc; _para5:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteCreatePersona';
{$ELSE}
nzteCreatePersona : function (_para1:Pnzctx; _para2:nzttVersion; _para3:nzttCipherType; _para4:PnzttPersonaDesc; _para5:PPnzttPersona):nzerror;cdecl;
{$ENDIF}
{----------------- nztiStoreTrustedIdentity ----------------- }
{
* NAME
* nztiStoreTrustedIdentity - Store an identity into a persona.
*
* PARAMETERS
* osscntxt IN Success.
* identity IN/OUT Trusted Identity.
* persona IN/OUT Persona.
*
* NOTES
* The identity is not saved with the persona in the wallet until
* the persona is stored.
*
* The identity parameter is double indirect so that it can point
* into the persona at the conclusion of the call.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztiStoreTrustedIdentity(_para1:Pnzctx; _para2:PPnzttIdentity; _para3:PnzttPersona):nzerror;cdecl;external ocilib name 'nztiStoreTrustedIdentity';
{$ELSE}
nztiStoreTrustedIdentity : function (_para1:Pnzctx; _para2:PPnzttIdentity; _para3:PnzttPersona):nzerror;cdecl;
{$ENDIF}
{--------------------- nzteSetProtection --------------------- }
{
* NAME
* nzteSetProtection - Set the protection type for a CE function.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN/OUT Persona.
* func IN CE function.
* tdufmt IN TDU Format.
* protinfo IN Protection information specific to this format.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_PROTECTION Unsupported protection.
* NZERROR_TK_PARMS Error in protection info.
}
{$IFNDEF LinkDynamically}
function nzteSetProtection(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:nztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;external ocilib name 'nzteSetProtection';
{$ELSE}
nzteSetProtection : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:nztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;
{$ENDIF}
{--------------------- nzteGetProtection --------------------- }
{
* NAME
* nzteGetProtection - Get the protection type for a CE function.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* func IN CE function.
* tdufmt OUT TDU format.
* protinfo OUT Protection information.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nzteGetProtection(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:Pnztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;external ocilib name 'nzteGetProtection';
{$ELSE}
nzteGetProtection : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:Pnztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;
{$ENDIF}
{-------------------- nztiRemoveIdentity -------------------- }
{
* NAME
* nztiRemoveIdentity - Remove an identity from an open persona.
*
* PARAMETERS
* osscntxt IN OSS context.
* identity IN/OUT Identity.
*
* NOTES
* If the persona is not stored, this identity will still be in the
* persona stored in the wallet.
*
* The identity parameter is doubly indirect so that at the
* conclusion of the function, the pointer can be set to NULL.
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTFOUND Identity not found.
* NZERROR_TK_NOTOPEN Persona is not open.
}
{$IFNDEF LinkDynamically}
function nztiRemoveIdentity(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiRemoveIdentity';
{$ELSE}
nztiRemoveIdentity : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{----------------- nztifdn ----------------- }
{
* NAME
* nztifdn - create an Identity From a Distinguished Name
*
* PARAMETERS
* osscntxt IN OSS context.
* length IN Length of the distinguished name
* distinguished_name IN distinguished name string
* ppidentity OUT created identity
*
* NOTES
* Given a distinguished name, return the identity that corresponds to it.
*
* RETURNS
* NZERROR_OK Success.
}
{$IFNDEF LinkDynamically}
function nztifdn(ossctx:Pnzctx; length:ub4; distinguished_name:Ptext; ppidentity:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztifdn';
{$ELSE}
nztifdn : function (ossctx:Pnzctx; length:ub4; distinguished_name:Ptext; ppidentity:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{--------------------- nztxSignExpansion --------------------- }
{
* NAME
* nztxSignExpansion - Determine the size of the attached signature buffer.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* inlen IN Length of input.
* tdulen OUT Buffer needed for signature.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztxSignExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxSignExpansion';
{$ELSE}
nztxSignExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
{$ENDIF}
{--------------- nztxsd_SignDetachedExpansion --------------- }
{
* NAME
* nztxsd_SignDetachedExpansion - Determine the size of buffer needed.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* inlen IN Length of input.
* tdulen OUT Buffer needed for signature.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztxsd_SignDetachedExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxsd_SignDetachedExpansion';
{$ELSE}
nztxsd_SignDetachedExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
{$ENDIF}
{------------------------ nztEncrypt ------------------------ }
{
* NAME
* nztEncrypt - Symmetrically encrypt
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* inlen IN Length of this input part.
* in IN This input part.
* tdubuf IN/OUT TDU buffer.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztEncrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztEncrypt';
{$ELSE}
nztEncrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{------------------- nztxEncryptExpansion ------------------- }
{
* NAME
* nztxEncryptExpansion - Determine the size of the TDU to encrypt.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* inlen IN Length of this input part.
* tdulen OUT Length of TDU.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztxEncryptExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxEncryptExpansion';
{$ELSE}
nztxEncryptExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
{$ENDIF}
{------------------------ nztDecrypt ------------------------ }
{
* NAME
* nztDecrypt - Decrypt an Encrypted message.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* state IN State of decryption.
* inlen IN Length of this input part.
* in IN This input part.
* out IN/OUT Cleartext message.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztDecrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztDecrypt';
{$ELSE}
nztDecrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{------------------------ nztEnvelope ------------------------ }
{
* NAME
* nztEnvelope - Sign and PKEncrypt a message.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* nrecipients IN Number of recipients for this encryption.
* recipients IN List of recipients.
* state IN State of encryption.
* inlen IN Length of this input part.
* in IN This input part.
* tdubuf IN/OUT TDU buffer.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow output buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztEnvelope(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
_para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztEnvelope';
{$ELSE}
nztEnvelope : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
_para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{----------------------- nztDeEnvelope ----------------------- }
{
* NAME
* nztDeEnvelope - PKDecrypt and verify a message.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* state IN State of encryption.
* inlen IN Length of this input part.
* in IN This input part.
* out OUT Message from TDU.
* verified OUT TRUE if verified.
* validated OUT TRUE if validated.
* sender OUT Identity of sender.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztDeEnvelope(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztDeEnvelope';
{$ELSE}
nztDeEnvelope : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;
{$ENDIF}
{----------------------- nztKeyedHash ----------------------- }
{
* NAME
* nztKeyedHash - Generate a keyed hash.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* state IN State of hash.
* inlen IN Length of this input.
* in IN This input.
* tdu IN/OUT Output tdu.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztKeyedHash(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztKeyedHash';
{$ELSE}
nztKeyedHash : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
_para6:PnzttBufferBlock):nzerror;cdecl;
{$ENDIF}
{------------------ nztxKeyedHashExpansion ------------------ }
{
* NAME
* nztxKeyedHashExpansion - Determine the space needed for a keyed hash.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* inlen IN Length of this input.
* tdulen OUT TDU length.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztxKeyedHashExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxKeyedHashExpansion';
{$ELSE}
nztxKeyedHashExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
{$ENDIF}
{--------------------- nztxHashExpansion --------------------- }
{
* NAME
* nztxHashExpansion - Determine the size of the TDU for a hash.
*
* PARAMETERS
* osscntxt IN OSS context.
* persona IN Persona.
* inlen IN Length of this input.
* tdulen OUT TDU length.
*
* NOTES
*
* RETURNS
* NZERROR_OK Success.
* NZERROR_TK_NOTOPEN Persona is not open.
* NZERROR_TK_NOTSUPP Function not supported with persona.
}
{$IFNDEF LinkDynamically}
function nztxHashExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxHashExpansion';
{$ELSE}
nztxHashExpansion : function(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
{$ENDIF}
{---------------- nztiae_IsAuthEnabled ---------------- }
{
* NAME
* nztiae_IsAuthEnabled - Checks to see if Authentication is Enabled
* in the current Cipher Spec.
*
* PARAMETERS
* ctx IN Oracle SSL Context
* ncipher IN CipherSuite
* authEnabled OUT Boolean for is Auth Enabled?
*
* NOTES
*
* RETURNS
* NZERROR_OK on success.
* NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
}
{$IFNDEF LinkDynamically}
function nztiae_IsAuthEnabled(_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;external ocilib name 'nztiae_IsAuthEnabled';
{$ELSE}
nztiae_IsAuthEnabled : function (_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;
{$ENDIF}
{---------------- nztiee_IsEncrEnabled ---------------- }
{
* NAME
* nztiee_IsEncrEnabled - Checks to see if Encryption is Enabled
* in the current Cipher Spec.
*
* PARAMETERS
* ctx IN Oracle SSL Context
* ncipher IN CipherSuite
* EncrEnabled OUT Boolean for is Auth Enabled?
*
* NOTES
*
* RETURNS
* NZERROR_OK on success.
* NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
}
{$IFNDEF LinkDynamically}
function nztiee_IsEncrEnabled(_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;external ocilib name 'nztiee_IsEncrEnabled';
{$ELSE}
nztiee_IsEncrEnabled : function (_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;
{$ENDIF}
{---------------- nztihe_IsHashEnabled ---------------- }
{
* NAME
* nztihe_IsHashEnabled - Checks to see if HAshing is Enabled
* in the current Cipher Spec.
*
* PARAMETERS
* ctx IN Oracle SSL Context
* ncipher IN CipherSuite
* hashEnabled OUT Boolean for is Auth Enabled?
*
* NOTES
*
* RETURNS
* NZERROR_OK on success.
* NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
}
{$IFNDEF LinkDynamically}
function nztihe_IsHashEnabled(_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;external ocilib name 'nztihe_IsHashEnabled';
{$ELSE}
nztihe_IsHashEnabled : function (_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;
{$ENDIF}
{
*
}
{$IFNDEF LinkDynamically}
function nztGetIssuerName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetIssuerName';
function nztGetSubjectName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetSubjectName';
function nztGetBase64Cert(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetBase64Cert';
function nztGetSerialNumber(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetSerialNumber';
function nztGetValidDate(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetValidDate';
function nztGetVersion(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pnzstrc):nzerror;cdecl;external ocilib name 'nztGetVersion';
function nztGetPublicKey(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetPublicKey';
function nztGenericDestroy(_para1:Pnzctx; _para2:PPub1):nzerror;cdecl;external ocilib name 'nztGenericDestroy';
function nztSetAppDefaultLocation(_para1:Pnzctx; _para2:Ptext; _para3:size_t):nzerror;cdecl;external ocilib name 'nztSetAppDefaultLocation';
function nztSearchNZDefault(_para1:Pnzctx; _para2:Pboolean):nzerror;cdecl;external ocilib name 'nztSearchNZDefault';
{$ELSE}
nztGetIssuerName : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
nztGetSubjectName: function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
nztGetBase64Cert : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
nztGetSerialNumber : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
nztGetValidDate : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:Pub4):nzerror;cdecl;
nztGetVersion : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pnzstrc):nzerror;cdecl;
nztGetPublicKey : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
nztGenericDestroy : function(_para1:Pnzctx; _para2:PPub1):nzerror;cdecl;
nztSetAppDefaultLocation : function(_para1:Pnzctx; _para2:Ptext; _para3:size_t):nzerror;cdecl;
nztSearchNZDefault : function(_para1:Pnzctx; _para2:Pboolean):nzerror;cdecl;
{$ENDIF}
|