3
Automatically converted by H2Pas 1.0.0 from nzt.h
4
The following command line parameters were used:
17
PPnzttIdentity = pointer;
18
PPnzttPersona = pointer;
22
{ DISABLE check_long_lines }
23
{ Copyright (c) 1996, 2004, Oracle. All rights reserved. }
24
{ Copyright (c) 1996, 2004, Oracle. All rights reserved. }
26
* $Header: nzt.h 10-aug-2004.11:55:06 rchahal Exp $
33
* Toolkit public declarations.
36
* nztwOpenWallet - Open a wallet based on a WRL and pwd.
37
* nztwCloseWallet - Close a wallet.
38
* + nztwCreateWallet - Create a new wallet.
39
* + nztwDestroyWallet - Destroy an existing wallet.
40
* nztwRetrievePersonaCopy - Retieve a copy of a particular persona.
41
* + nzteStorePersona - Store a persona in the wallet.
42
* nzteOpenPersona - Open a persona.
43
* nzteClosePersona - Close a persona.
44
* + nzteRemovePersona - Remove a persona from a wallet.
45
* + nzteCreatePersona - Create a persona.
46
* nzteDestroyPersona - Destroy a persona.
47
* nztiStoreTrustedIdentity - Store an identity with associated trust.
48
* nzteRetrieveTrustedIdentCopy - Retrieves a trusted identity from persona
49
* + nzteSetProtection - Modify the protection set in a persona.
50
* + nzteGetProtection - Get the protection set in a persona
51
* nztePriKey - Get the Private Key (X509 Only)
52
* nzteMyCert - Get the Certificate (X509 only)
53
* nzteX509CreatePersona - Create a persona given an X509 Certificate.
54
* + nztiRemoveIdentity - Remove an identity from a persona.
55
* nztiCreateIdentity - Create an identity.
56
* nztiDuplicateIdentity - Create a complete copy of an identity.
57
* nztiAbortIdentity - Discard an unstored identity.
58
* nztidGetIdentityDesc - Gets Identity Description from Identity.
59
* nztidFreeIdentityDesc - Frees memory for Identity Desc object.
60
* nztSign - Generate an attached signature.
61
* + nztxSignExpansion - Determine size of signature.
62
* nztVerify - Verify an attached signature.
63
* nztValidate - Validate an identity.
64
* nztsd_SignDetached - Generate a detached signature.
65
* + nztxsd_SignDetachedExpansion - Determine size of detached signature.
66
* nztved_VerifyDetached - Verify a detached signature.
67
* + nztEncrypt - Symmetric key encryption.
68
* + nztxEncryptExpansion - Determine the tdu length for encryption.
69
* + nztDecrypt - Symmetric key decryption.
70
* + nztEnvelope - Sign then encrypt data for recipient(s).
71
* + nztDeEnvelope - Reverse nztEnvelope.
72
* + nztKeyedHash - Generate keyed hash.
73
* + nztxKeyedHashExpansion - Determine size of TDU for keyed hash.
74
* nztHash - Generate hash.
75
* + nztxHashExpansion - Determine the size of the TDU for a hash.
76
* nztSeedRandom - See the random number generator.
77
* nztrb_RandomBytes - Generate a series of random bytes.
78
* nztrn_RandomNumber - Generate a random number.
79
* nztbbInitBlock - Initialize a buffer block.
80
* nztbbReuseBlock - Reuse a buffer block.
81
* nztbbSizeBlock - Find the size of the buffer block.
82
* nztbbGrowBlock - Grow initialized buffer block by 'inc' bytes.
83
* nztbbPurgeBlock - Purge the memory used within a buffer block.
84
* nztbbSetBlock - Set block to known state.
85
* nztkec_PKEncrypt - Encrypt data then encrypt key for recipient.
86
* nztkdc_PKDecrypt - Decrypt PKEncrypt'ed data.
87
* nztific_FreeIdentityContent - Free the contents of an identity.
88
* nztifdn - Create an identity from a distinguished name
89
* nztcts_CipherSpecToStr - Converts the Cipher Spec Code To String
90
* nztiae_IsAuthEnabled - Checks to see if Authentication is Enabled
91
* in the current Cipher Spec.
92
* nztiae_IsEncrEnabled - Checks to see if Encryption is Enabled
93
* in the current Cipher Spec.
94
* nztiae_IsHashEnabled - Checks to see if Hashing is Enabled
95
* in the current Cipher Spec.
96
* nztwGetCertInfo - Get peer certificate info
98
* NOTE: the '+' indicates that these functions are UNSUPPORTED at this time.
103
* rchahal 07/27/04 - add keyusage
104
* srtata 11/10/03 - fix nztSetAppDefaultLocation header
105
* rchahal 10/15/03 - bug 2513821
106
* rchahal 11/11/02 - pkcs11 support
107
* akoyfman 07/05/02 - adding secret store to persona
108
* supriya 10/11/01 - Fix for bug # 2015732
109
* ajacobs 04/04/01 - make NZT_REGISTRY_WRL always available
110
* ajacobs 03/06/01 - olint fix
111
* ajacobs 03/02/01 - Add GetCertInfo
112
* supriya 02/23/01 - Move nzttKPUsage from nzt0.h
113
* rchahal 01/26/01 - olint fixes
114
* supriya 12/07/00 - Change fn name
115
* supriya 12/01/00 - Certificate API's needed for iAS
116
* supriya 06/19/00 - Adding definitions for MCS and ENTR
117
* lkethana 05/31/00 - multiple cert support
118
* skanjila 06/25/99 - Remove nztcts_CipherSpecToStr() to NZOS.
119
* skanjila 06/23/99 - Change API of nztcts_CipherSpecToStr.
120
* lkethana 06/18/99 - rem nztIPrivateAlloc, etc
121
* lkethana 06/10/99 - changing size_t to ub4
122
* lkethana 06/02/99 - add api for getting auth/encry/hash capability of c
123
* arswamin 12/28/98 - add NZT_MAX_MD5.
124
* arswamin 12/21/98 - change signature of compareDN
125
* qdinh 12/21/98 - change size_t to ub4.
126
* inetwork 11/22/98 - Removing NZDEPRECATED definition
127
* amthakur 09/14/98 - deprecating and updating the c-structures.
128
* arswamin 09/24/98 - adding NZTTWRL_NULL for SSO support.
129
* amthakur 07/30/98 - changing the prototype of nztGetCertChain.
130
* qdinh 05/01/98 - add NZTTIDENTTYPE_INVALID_TYPE
131
* qdinh 04/17/98 - add NZTTWRL_ORACLE.
132
* ascott 10/08/97 - implement nztiStoreTrustedIdentity
133
* ascott 10/07/97 - add nztiGetIdentityDesc
134
* ascott 09/28/97 - clarify prototype comments and error codes
135
* ascott 09/05/97 - update identity: create, destroy, duplicate
136
* ascott 08/21/97 - add GetCert and GetPriKey
137
* ascott 08/07/97 - add other WRL settings
138
* asriniva 03/25/97 - Add ANSI prototypes
139
* rwessman 03/19/97 - Added prototypes for nztific_FreeIdentityContent()
140
* asriniva 03/11/97 - Fix olint errors
141
* sdange 02/28/97 - Removed inclusion of nz0decl.h
142
* sdange 02/18/97 - Moved nzt specific declarations from nz0decl.h
143
* asriniva 01/21/97 - Remove prototypes.
144
* asriniva 10/31/96 - Include oratypes.h
145
* asriniva 10/15/96 - Declare buffer block helper functions
146
* asriniva 10/08/96 - First pass at wallet open/close
147
* asriniva 10/04/96 - Add random number seed function
148
* asriniva 10/03/96 - Reorder parameters in nztbbSetBlock
149
* asriniva 10/03/96 - Keep editing.
150
* asriniva 10/03/96 - Continued edits.
151
* asriniva 10/02/96 - Continue editing.
152
* asriniva 09/26/96 -
154
{ ENABLE check_long_lines }
156
{$include nzerror.inc} // NZ error type
162
{************************************* }
163
{ PUBLIC CONSTANTS, MACROS, AND TYPES }
164
{************************************* }
166
* Wallet Resource Locator Type Strings
168
* WRL TYPE PARAMETERS BEHAVIOR
169
* ======== ========== =====================================
170
* default: <none> Uses directory defined by the parameter
171
* SNZD_DEFAULT_FILE_DIRECTORY which in
172
* unix is "$HOME/oracle/oss"
174
* file: file path Find the Oracle wallet in this directory.
175
* example: file:<dir-path>
177
* sqlnet: <none> In this case, the directory path will be
178
* retrieved from the sqlnet.ora file under
179
* the oss.source.my_wallet parameter.
181
* mcs: <none> Microsoft WRL.
183
* entr: dir path Entrust WRL. eg: ENTR:<dir-path>
186
{ Note that there is no NZT_NULL_WRL. Instead look in snzd.h for DEFAULT_WRP
187
* which is used in our new defaulting mechanism. The NZT_DEFAULT_WRL
188
* should be deprecated.
192
NZT_DEFAULT_WRL:Ptext = 'default:';
193
NZT_SQLNET_WRL:Ptext ='sqlnet:';
194
NZT_FILE_WRL:Ptext='file:';
195
NZT_ENTR_WRL:Ptext='entr:';
196
NZT_MCS_WRL:Ptext='mcs:';
197
NZT_ORACLE_WRL:Ptext='oracle:';
198
NZT_REGISTRY_WRL:Ptext='reg:';
200
{ Default, use SNZD_DEFAULT_FILE_DIRECTORY }
201
{ Use oss.source.my_wallet in sqlnet.ora file }
202
{ Find the oracle wallet in this directory }
203
{ Find the entrust profile in this directory }
204
{ WRL for Microsoft }
205
{ Get the wallet from OSS db }
206
{ New SSO defaulting mechanism }
207
{ Find the wallet in Windows Registry }
210
nzttwrl = (NZTTWRL_DEFAULT := 1,NZTTWRL_SQLNET,
211
NZTTWRL_FILE,NZTTWRL_ENTR,NZTTWRL_MCS,
212
NZTTWRL_ORACLE,NZTTWRL_NULL,NZTTWRL_REGISTRY
217
{$ifndef NZ0DECL_ORACLE}
219
* With the elimination of nz0decl.h from public, we need this
225
{ Moved from nz0decl.h }
228
PnzttIdentityPrivate = pointer;
229
PnzttPersonaPrivate = pointer;
230
PnzttWalletPrivate = pointer;
231
PnzttWalletObj = pointer; // For wallet object
232
PnzssEntry = pointer; // For secretstore
233
Pnzpkcs11_Info = pointer;
236
* Crypto Engine State
238
* Once the crypto engine (CE) has been initialized for a particular
239
* cipher, it is either at the initial state, or it is continuing to
240
* use the cipher. NZTCES_END is used to change the state back to
241
* initialized and flush any remaining output. NZTTCES_RESET can be
242
* used to change the state back to initialized and throw away any
245
{ Continue processing input }
246
{ End processing input }
247
{ Reset processing and skip generating output }
248
nzttces = (NZTTCES_CONTINUE := 1,NZTTCES_END,NZTTCES_RESET
254
* Crypto Engine Functions
256
* List of crypto engine categories; used to index into protection
259
{ Signature, detached from content }
260
{ Signature combined with content }
261
{ Signature and encryption with content }
262
{ Encryption for one or more recipients }
263
{ Symmetric encryption }
264
{ Keyed hash/checkusm }
266
{ Random byte generation }
267
{ Used for array size }
268
nzttcef = (NZTTCEF_DETACHEDSIGNATURE := 1,NZTTCEF_SIGNATURE,
269
NZTTCEF_ENVELOPING,NZTTCEF_PKENCRYPTION,
270
NZTTCEF_ENCRYPTION,NZTTCEF_KEYEDHASH,
271
NZTTCEF_HASH,NZTTCEF_RANDOM,NZTTCEF_LAST
277
* State of the persona.
279
{ is not in any state(senseless???) }
283
{ renewal-requested }
284
nzttState = (NZTTSTATE_EMPTY := 0,NZTTSTATE_REQUESTED,
285
NZTTSTATE_READY,NZTTSTATE_INVALID,NZTTSTATE_RENEWAL
289
PnzttState = ^nzttState;
293
* This is used to quickly look-up the cert-type
297
{$ifdef NZDEPRECATED}
300
{ For Initialization }
303
nzttVersion = (NZTTVERSION_X509v1 := 1,NZTTVERSION_X509v3,
304
NZTTVERSION_SYMMETRIC,NZTTVERSION_INVALID_TYPE
308
PnzttVersion = ^nzttVersion;
312
* List of all cryptographic algorithms, some of which may not be
318
{ DES encrypted MD5 with salt (PBE) }
319
{ RC2 encrypted MD5 with salt (PBE) }
322
nzttCipherType = (NZTTCIPHERTYPE_RSA := 1,NZTTCIPHERTYPE_DES,
323
NZTTCIPHERTYPE_RC4,NZTTCIPHERTYPE_MD5DES,
324
NZTTCIPHERTYPE_MD5RC2,NZTTCIPHERTYPE_MD5,
328
PnzttCipherType = ^nzttCipherType;
332
* List of possible toolkit data unit (TDU) formats. Depending on the
333
* function and cipher used some may be not be available.
336
{ RSA padded format }
338
{ Used for array size }
339
nztttdufmt = (NZTTTDUFMT_PKCS7 := 1,NZTTTDUFMT_RSAPAD,
340
NZTTTDUFMT_ORACLEv1,NZTTTDUFMT_LAST
344
Pnztttdufmt = ^nztttdufmt;
348
* Possible validation states an identity can be in.
350
{ Needs to be validated }
352
{ Failed to validate }
353
nzttValState = (NZTTVALSTATE_NONE := 1,NZTTVALSTATE_GOOD,
354
NZTTVALSTATE_REVOKED);
357
PnzttValState = ^nzttValState;
359
* Policy Fields <----NEW (09/14/98)
363
{ number of retries for decryption = 1 }
364
{ number of retries for decryption = 2 }
365
{ number of retries for decryption = 3 }
366
nzttPolicy = (NZTTPOLICY_NONE := 0,NZTTPOLICY_RETRY_1,
367
NZTTPOLICY_RETRY_2,NZTTPOLICY_RETRY_3
371
PnzttPolicy = ^nzttPolicy;
373
* Persona Usage <----NEW (09/14/98)
375
* what a persona will be used for?
377
{ $ifdef NZDEPRECATED_MULTIPLECERTS}
378
{ persona for SSL usage }
381
nzttUsage = (NZTTUSAGE_NONE := 0,NZTTUSAGE_SSL);
384
PnzttUsage = ^nzttUsage;
385
// nzttUsage = nzttUsage;
388
* Personas and identities have unique id's that are represented with
399
* List of all Identity types..
401
nzttIdentType = (NZTTIDENTITYTYPE_INVALID_TYPE := 0,
402
NZTTIDENTITYTYPE_CERTIFICTAE,NZTTIDENTITYTYPE_CERT_REQ,
403
NZTTIDENTITYTYPE_RENEW_CERT_REQ,NZTTIDENTITYTYPE_CLEAR_ETP,
404
NZTTIDENTITYTYPE_CLEAR_UTP,NZTTIDENTITYTYPE_CLEAR_PTP
408
PnzttIdentType = ^nzttIdentType;
410
PnzttKPUsage = ^nzttKPUsage;
412
{ IF new types are added nztiMUS should be changed }
415
NZTTKPUSAGE_NONE = 0;
418
NZTTKPUSAGE_SMIME_ENCR = 2;
419
NZTTKPUSAGE_SMIME_SIGN = 4;
420
NZTTKPUSAGE_CODE_SIGN = 8;
421
NZTTKPUSAGE_CERT_SIGN = 16;
423
NZTTKPUSAGE_SSL_CLIENT = 32;
424
NZTTKPUSAGE_INVALID_USE = $ffff;
426
* Timestamp as 32 bit quantity in UTC.
431
PnzttTStamp = ^nzttTStamp;
436
* A function that needs to fill (and possibly grow) an output buffer
437
* uses an output parameter block to describe each buffer.
439
* The flags_nzttBufferBlock member tells the function whether the
440
* buffer can be grown or not. If flags_nzttBufferBlock is 0, then
441
* the buffer will be realloc'ed automatically.
443
* The buflen_nzttBufferBLock member is set to the length of the
444
* buffer before the function is called and will be the length of the
445
* buffer when the function is finished. If buflen_nzttBufferBlock is
446
* 0, then the initial pointer stored in pobj_nzttBufferBlock is
449
* The objlen_nzttBufferBlock member is set to the length of the
450
* object stored in the buffer when the function is finished. If the
451
* initial buffer had a non-0 length, then it is possible that the
452
* object length is shorter than the buffer length.
454
* The pobj_nzttBufferBlock member is a pointer to the output object.
456
{ # define NZT_NO_AUTO_REALLOC 0x1 }
458
{ Total length of buffer }
459
{ Length of used buffer part }
460
{ Pointer to buffer }
461
PnzttBufferBlock = ^nzttBufferBlock;
462
nzttBufferBlock = record
463
flags_nzttBufferBlock : uword;
464
buflen_nzttBufferBlock : ub4;
465
usedlen_nzttBufferBlock : ub4;
466
buffer_nzttBufferBlock : Pub1;
473
{ len of user's LDAP Name }
474
{ secured-policy of the wallet }
475
{ open-policy of the wallet }
476
{ List of personas in wallet }
477
{ Private wallet information }
478
{$ifdef NZDEPRECATED}
479
{ Number of personas }
483
PnzttPersona = ^nzttPersona;
484
PnzttWallet = ^nzttWallet;
485
PnzttIdentity = ^nzttIdentity;
487
ldapName_nzttWallet : Pub1;
488
ldapNamelen_nzttWallet : ub4;
489
securePolicy_nzttWallet : nzttPolicy;
490
openPolicy_nzttWallet : nzttPolicy;
491
persona_nzttWallet : PnzttPersona;
492
private_nzttWallet : PnzttWalletPrivate;
493
npersona_nzttWallet : ub4;
497
* The wallet contains, one or more personas. A persona always
498
* contains its private key and its identity. It may also contain
499
* other 3rd party identites. All identities qualified with trust
500
* where the qualifier can indicate anything from untrusted to trusted
501
* for specific operations.
506
* Structure containing information about a persona.
508
{ user-friendly persona name }
509
{ persona-name length }
510
{ Opaque part of persona }
513
{ List of trusted identities }
515
{ PKCS11 token info }
517
{$ifdef NZDEPRECATED_MULTIPLECERTS}
518
{ As Persona has multiple certs for different
519
usages, Persona Usage does not mean anything. Similarly
520
each key pair has its own state and Persona state itself
521
does not mean anything. - lk 5/31/00
523
{ persona usage; SSL/SET/.. }
524
{ persona state-requested/ready }
525
{ Num of trusted identities }
529
genericName_nzttPersona : Pub1;
530
genericNamelen_nzttPersona : ub4;
531
private_nzttPersona : PnzttPersonaPrivate;
532
mycertreqs_nzttPersona : PnzttIdentity;
533
mycerts_nzttPersona : PnzttIdentity;
534
mytps_nzttPersona : PnzttIdentity;
535
mystore_nzttPersona : PnzssEntry;
536
mypkcs11Info_nzttPersona : Pnzpkcs11_Info;
537
next_nzttPersona : PnzttPersona;
538
usage_nzttPersona : nzttUsage;
539
state_nzttPersona : nzttState;
540
ntps_nzttPersona : ub4;
546
* Structure containing information about an identity.
549
* -- the next_trustpoint field only applies to trusted identities and
550
* has no meaning (i.e. is NULL) for self identities.
555
{ Length of comment }
556
{ Opaque part of identity }
557
{ next identity in list }
558
nzttIdentity = record
559
dn_nzttIdentity : Ptext;
560
dnlen_nzttIdentity : ub4;
561
comment_nzttIdentity : Ptext;
562
commentlen_nzttIdentity : ub4;
563
private_nzttIdentity : PnzttIdentityPrivate;
564
next_nzttIdentity : PnzttIdentity;
567
PnzttB64Cert = ^nzttB64Cert;
569
b64Cert_nzttB64Cert : Pub1;
570
b64Certlen_nzttB64Cert : ub4;
571
next_nzttB64Cert : PnzttB64Cert;
576
{ Length of key to use }
577
PnzttPKCS7ProtInfo = ^nzttPKCS7ProtInfo;
578
nzttPKCS7ProtInfo = record
579
mictype_nzttPKCS7ProtInfo : nzttCipherType;
580
symmtype_nzttPKCS7ProtInfo : nzttCipherType;
581
keylen_nzttPKCS7ProtInfo : ub4;
585
* Protection Information.
587
* Information specific to a type of protection.
589
PnzttProtInfo = ^nzttProtInfo;
590
nzttProtInfo = record
592
0 : ( pkcs7_nzttProtInfo : nzttPKCS7ProtInfo );
597
* A description of a persona so that the toolkit can create one. A
598
* persona can be symmetric or asymmetric and both contain an
599
* identity. The identity for an asymmetric persona will be the
600
* certificate and the identity for the symmetric persona will be
601
* descriptive information about the persona. In either case, an
602
* identity will have been created before the persona is created.
604
* A persona can be stored separately from the wallet that references
605
* it. By default, a persona is stored with the wallet (it inherits
606
* with WRL used to open the wallet). If a WRL is specified, then it
607
* is used to store the actuall persona and the wallet will have a
610
{ Length of private info (key) }
611
{ Private information }
616
{ Length of longer description }
617
{ Longer persona description }
618
PnzttPersonaDesc = ^nzttPersonaDesc;
619
nzttPersonaDesc = record
620
privlen_nzttPersonaDesc : ub4;
621
priv_nzttPersonaDesc : Pub1;
622
prllen_nzttPersonaDesc : ub4;
623
prl_nzttPersonaDesc : Ptext;
624
aliaslen_nzttPersonaDesc : ub4;
625
alias_nzttPersonaDesc : Ptext;
626
longlen_nzttPersonaDesc : ub4;
627
long_nzttPersonaDesc : Ptext;
631
* A description of an identity so that the toolkit can create one.
632
* Since an identity can be symmetric or asymmetric, the asymmetric
633
* identity information will not be used when a symmetric identity is
634
* created. This means the publen_nzttIdentityDesc and
635
* pub_nzttIdentityDesc members will not be used when creating a
636
* symmetric identity.
638
{ Length of identity }
639
{ Type specific identity }
642
{ Length of longer description }
643
{ Longer description }
644
{ Length of trust qualifier }
646
PnzttIdentityDesc = ^nzttIdentityDesc;
647
nzttIdentityDesc = record
648
publen_nzttIdentityDesc : ub4;
649
pub_nzttIdentityDesc : Pub1;
650
dnlen_nzttIdentityDesc : ub4;
651
dn_nzttIdentityDesc : Ptext;
652
longlen_nzttIdentityDesc : ub4;
653
long_nzttIdentityDesc : Ptext;
654
quallen_nzttIdentityDesc : ub4;
655
trustqual_nzttIdentityDesc : Ptext;
658
{****************************** }
659
{ PUBLIC FUNCTION DECLARATIONS }
660
{****************************** }
661
{---------------------- nztwOpenWallet ---------------------- }
664
* nztwOpenWallet - Open a wallet based on a wallet Resource Locator (WRL).
667
* osscntxt IN OSS context.
668
* wrllen IN Length of WRL.
670
* pwdlen IN Length of password.
672
* wallet IN/OUT Initialized wallet structure.
675
* The syntax for a WRL is <Wallet Type>:<Wallet Type Parameters>.
677
* Wallet Type Wallet Type Parameters.
678
* ----------- ----------------------
679
* File Pathname (e.g. "file:/home/asriniva")
680
* Oracle Connect string (e.g. "oracle:scott/tiger@oss")
682
* There are also defaults. If the WRL is NZT_DEFAULT_WRL, then
683
* the platform specific WRL default is used. If only the wallet
684
* type is specified, then the WRL type specific default is used
687
* There is an implication with Oracle that should be stated: An
688
* Oracle based wallet can be implemented in a user's private space
689
* or in world readable space.
691
* When the wallet is opened, the password is verified by hashing
692
* it and comparing against the password hash stored with the
693
* wallet. The list of personas (and their associated identities)
694
* is built and stored into the wallet structure.
697
* NZERROR_OK Success.
698
* NZERROR_RIO_OPEN RIO could not open wallet (see network trace file).
699
* NZERROR_TK_PASSWORD Password verification failed.
700
* NZERROR_TK_WRLTYPE WRL type is not known.
701
* NZERROR_TK_WRLPARM WRL parm does not match type.
703
{$IFNDEF LinkDynamically}
704
function nztwOpenWallet(_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
705
_para6:PnzttWallet):nzerror;cdecl;external ocilib name 'nztwOpenWallet';
707
var nztwOpenWallet : function (_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
708
_para6:PnzttWallet):nzerror;cdecl;
712
{---------------------- nztwCloseWallet ---------------------- }
715
* nztwCloseWallet - Close a wallet
718
* osscntxt IN OSS context.
719
* wallet IN/OUT Wallet.
722
* Closing a wallet also closes all personas associated with that
723
* wallet. It does not cause a persona to automatically be saved
724
* if it has changed. The implication is that a persona can be
725
* modified by an application but if it is not explicitly saved it
726
* reverts back to what was in the wallet.
729
* NZERROR_OK Success.
730
* NZERROR_RIO_CLOSE RIO could not close wallet (see network trace file).
732
{$IFNDEF LinkDynamically}
733
function nztwCloseWallet(_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;external ocilib name 'nztwCloseWallet';
735
nztwCloseWallet : function (_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;
737
{--------------------nztwGetCertInfo---------------------------- }
738
{***NOTE: This function is a temporary hack.*** }
739
{***DO NOT CALL. It will soon disappear.*** }
740
{_ nzctx *nz_context,
741
nzosContext *nzosCtx,
742
nzttWallet *walletRef,
743
void *peerCert _ }(* error
745
in declarator_list *)
746
{------------------------ nztwConstructWallet ----------------------- }
749
* nzerror nztwConstructWallet( nzctx *oss_context,
750
* nzttPolicy openPolicy,
751
* nzttPolicy securePolicy,
755
* nzttPersona *personas,
756
* nzttWallet **wallet );
758
{---------------------- nztwRetrievePersonaCopy ---------------------- }
761
* nztwRetrievePersonaCopy - Retrieves a persona based from wallet
764
* osscntxt IN OSS context.
766
* index IN Which wallet index to remove (first persona is zero).
767
* persona OUT Persona found.
770
* Retrieves a persona from the wallet based on the index number passed
771
* in. This persona is a COPY of the one stored in the wallet, therefore
772
* it is perfectly fine for the wallet to be closed after this call is
775
* The caller is responsible for disposing of the persona when completed.
778
* NZERROR_OK Success.
781
{$IFNDEF LinkDynamically}
782
function nztwRetrievePersonaCopy(_para1:Pnzctx; _para2:PnzttWallet; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;external ocilib name 'nztwRetrievePersonaCopy';
784
nztwRetrievePersonaCopy : function (_para1:Pnzctx; _para2:PnzttWallet; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;
787
{---------------------- nztwRetrievePersonaCopyByName ---------------------- }
790
* nztwRetrievePersonaCopyByName - Retrieves a persona based on its name.
793
* osscntxt IN OSS context.
795
* name IN Name of the persona
796
* persona OUT Persona found.
799
* Retrieves a persona from the wallet based on the name of the persona.
800
* This persona is a COPY of the one stored in the wallet, therefore
801
* it is perfectly fine for the wallet to be closed after this call is
804
* The caller is responsible for disposing of the persona when completed.
807
* NZERROR_OK Success.
810
{$IFNDEF LinkDynamically}
811
function nztwRetrievePersonaCopyByName(_para1:Pnzctx; _para2:PnzttWallet; _para3:Pchar; _para4:PPnzttPersona):nzerror;cdecl;external ocilib name 'nztwRetrievePersonaCopyByName';
813
nztwRetrievePersonaCopyByName : function (_para1:Pnzctx; _para2:PnzttWallet; _para3:Pchar; _para4:PPnzttPersona):nzerror;cdecl;
816
{---------------------- nzteOpenPersona ---------------------- }
819
* nzteOpenPersona - Open a persona.
822
* osscntxt IN OSS context.
823
* persona IN/OUT Persona.
828
* NZERROR_OK Success.
829
* NZERROR_TK_PASSWORD Password failed to decrypt persona.
830
* NZERROR_TK_BADPRL Persona resource locator did not work.
831
* NZERROR_RIO_OPEN Could not open persona (see network trace file).
834
{$IFNDEF LinkDynamically}
835
function nzteOpenPersona(_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;external ocilib name 'nzteOpenPersona';
837
nzteOpenPersona : function (_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;
840
{--------------------- nzteClosePersona --------------------- }
843
* nzteClosePersona - Close a persona.
846
* osscntxt IN OSS context.
847
* persona IN/OUT Persona.
850
* Closing a persona does not store the persona, it simply releases
851
* the memory associated with the crypto engine.
854
* NZERROR_OK Success.
857
{$IFNDEF LinkDynamically}
858
function nzteClosePersona(_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;external ocilib name 'nzteClosePersona';
860
nzteClosePersona : function (_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;
863
{--------------------- nzteDestroyPersona --------------------- }
866
* nzteDestroyPersona - Destroy a persona.
869
* osscntxt IN OSS context.
870
* persona IN/OUT Persona.
873
* The persona is destroyd in the open state, but it will
874
* not be associated with a wallet.
876
* The persona parameter is doubly indirect so that at the
877
* conclusion of the function, the pointer can be set to NULL.
881
* NZERROR_OK Success.
882
* NZERROR_TK_TYPE Unsupported itype/ctype combination.
883
* NZERROR_TK_PARMS Error in persona description.
886
{$IFNDEF LinkDynamically}
887
function nzteDestroyPersona(_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteDestroyPersona';
889
nzteDestroyPersona : function (_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;
892
{---------------------- nzteRetrieveTrustedIdentCopy ---------------------- }
895
* nzteRetrieveTrustedIdentCopy - Retrieves a trusted identity from persona
898
* osscntxt IN OSS context.
899
* persona IN Persona.
900
* index IN Which wallet index to remove (first element is zero).
901
* identity OUT Trusted Identity from this persona.
904
* Retrieves a trusted identity from the persona based on the index
905
* number passed in. This identity is a COPY of the one stored in
906
* the persona, therefore it is perfectly fine to close the persona
907
* after this call is made.
909
* The caller is responsible for freeing the memory of this object
910
* by calling nztiAbortIdentity it is no longer needed
913
* NZERROR_OK Success.
916
{$IFNDEF LinkDynamically}
917
function nzteRetrieveTrustedIdentCopy(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nzteRetrieveTrustedIdentCopy';
919
nzteRetrieveTrustedIdentCopy : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PPnzttIdentity):nzerror;cdecl;
922
{--------------------- nztePriKey --------------------- }
925
* nztePriKey - Get the decrypted Private Key for the Persona
928
* osscntxt IN OSS context.
929
* persona IN Persona.
930
* vkey OUT Private Key [B_KEY_OBJ]
931
* vkey_len OUT Private Key Length
934
* This funiction will only work for X.509 based persona which contain
936
* A copy of the private key is returned to the caller so that they do not
937
* have to worry about the key changeing "underneath them".
938
* Memory will be allocated for the vkey and therefore, the CALLER
939
* will be responsible for freeing this memory.
942
* NZERROR_OK Success.
943
* NZERROR_NO_MEMORY ossctx is null.
944
* NZERROR_TK_BADPRL Persona resource locator did not work.
947
{$IFNDEF LinkDynamically}
948
function nztePriKey(_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztePriKey';
950
nztePriKey : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
953
{--------------------- nzteMyCert --------------------- }
956
* nzteMyCert - Get the X.509 Certificate for a persona
959
* osscntxt IN OSS context.
960
* persona IN Persona.
961
* cert OUT X.509 Certificate [BER encoded]
962
* cert_len OUT Certificate length
965
* This funiction will only work for X.509 based persona which contain
966
* a certificate for the self identity.
967
* A copy of the certificate is returned to the caller so that they do not
968
* have to worry about the certificate changeing "underneath them".
969
* Memory will be allocated for the cert and therefore, the CALLER
970
* will be responsible for freeing this memory.
973
* NZERROR_OK Success.
974
* NZERROR_NO_MEMORY ossctx is null.
977
{$IFNDEF LinkDynamically}
978
function nzteMyCert(_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nzteMyCert';
980
nzteMyCert : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
983
{--------------------- nzteX509CreatePersona --------------------- }
986
* nzteX509CreatePersona - Given a BER X.509 cert, create a persona
989
* osscntxt IN OSS context.
990
* cert IN X.509 Certificate [BER encoded]
991
* cert_len IN Certificate length
992
* persona OUT Persona.
995
* Memory will be allocated for the persona and therefore, the CALLER
996
* will be responsible for freeing this memory.
999
* NZERROR_OK Success.
1000
* NZERROR_NO_MEMORY ossctx is null.
1003
{$IFNDEF LinkDynamically}
1004
function nzteX509CreatePersona(_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteX509CreatePersona';
1006
nzteX509CreatePersona : function (_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;
1009
{-------------------- nztiCreateIdentity -------------------- }
1012
* nztiCreateIdentity - Create an identity.
1015
* osscntxt IN OSS context.
1016
* itype IN Identity type.
1017
* desc IN Description of identity.
1018
* identity IN/OUT Identity.
1021
* Memory is only allocated for the identity structure. The elements in
1022
* the description struct are not copied. Rather their pointers are copied
1023
* into the identity structure. Therefore, the caller should not free
1024
* the elements referenced by the desc. These elements will be freed
1025
* when the nztiDestroyIdentity is called.
1028
* NZERROR_OK Success.
1029
* NZERROR_PARMS Error in description.
1032
{$IFNDEF LinkDynamically}
1033
function nztiCreateIdentity(_para1:Pnzctx; _para2:nzttVersion; _para3:PnzttIdentityDesc; _para4:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiCreateIdentity';
1035
nztiCreateIdentity : function (_para1:Pnzctx; _para2:nzttVersion; _para3:PnzttIdentityDesc; _para4:PPnzttIdentity):nzerror;cdecl;
1038
{$ifdef NZ_OLD_TOOLS}
1039
{-------------------- nztiDuplicateIdentity -------------------- }
1042
* nztiDuplicateIdentity - Duplicate an identity.
1045
* osscntxt IN OSS context.
1046
* identity IN Target Identity.
1047
* new_identity IN New Identity.
1050
* Memory for the identity is allocated inside the function, and all
1051
* internal identity elements as well.
1054
* NZERROR_OK Success.
1055
* NZERROR_TK_NOTFOUND Identity not found.
1056
* NZERROR_PARMS Error in description.
1059
{$IFNDEF LinkDynamically}
1060
function nztiDuplicateIdentity(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiDuplicateIdentity';
1062
nztiDuplicateIdentity : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentity):nzerror;cdecl;
1067
{--------------------- nztiAbortIdentity --------------------- }
1070
* nztiAbortIdentity - Abort an unassociated identity.
1073
* osscntxt IN OSS context.
1074
* identity IN/OUT Identity.
1077
* It is an error to try to abort an identity that can be
1078
* referenced through a persona.
1080
* The identity pointer is set to NULL at the conclusion.
1083
* NZERROR_OK Success.
1084
* NZERROR_CANTABORT Identity is associated with persona.
1087
{$IFNDEF LinkDynamically}
1088
function nztiAbortIdentity(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiAbortIdentity';
1090
nztiAbortIdentity : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
1093
{$ifdef NZ_OLD_TOOLS}
1094
{----------------- nztidGetIdentityDesc ----------------- }
1097
* nztidGetIdentityDesc - Gets an Identity Description from the identity
1100
* osscntxt IN Success.
1101
* identity IN Identity.
1102
* description IN/OUT Identity Description.
1105
* Memory is allocated for the Identity Description. It
1106
* is the callers responsibility to free this memory by calling
1107
* nztiFreeIdentityDesc.
1110
* NZERROR_OK Success.
1113
{$IFNDEF LinkDynamically}
1114
function nztidGetIdentityDesc(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentityDesc):nzerror;cdecl;external ocilib name 'nztidGetIdentityDesc';
1116
nztidGetIdentityDesc : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentityDesc):nzerror;cdecl;
1119
{----------------- nztidFreeIdentityDesc ----------------- }
1122
* nztidFreeIdentityDesc - Frees memory for Identity Desc object.
1125
* osscntxt IN oss context.
1126
* description IN/OUT Identity Description.
1129
* Memory is freed for all Identity description elements. Pointer is
1133
* NZERROR_OK Success.
1136
{$IFNDEF LinkDynamically}
1137
function nztidFreeIdentityDesc(_para1:Pnzctx; _para2:PPnzttIdentityDesc):nzerror;cdecl;external ocilib name 'nztidFreeIdentityDesc';
1139
nztidFreeIdentityDesc : fucntion (_para1:Pnzctx; _para2:PPnzttIdentityDesc):nzerror;cdecl;
1144
{---------------- nztific_FreeIdentityContent ---------------- }
1147
* nztific_FreeIdentityContent - free the contents of an identity.
1150
* osscntxt IN OSS context.
1151
* identity IN/OUT freed identity
1154
* Free a created identity.
1157
* NZERROR_OK Success.
1160
* Free the identity content.
1163
{$IFNDEF LinkDynamically}
1164
function nztific_FreeIdentityContent(ossctx:Pnzctx; identity:PnzttIdentity):nzerror;cdecl;external ocilib name 'nztific_FreeIdentityContent';
1166
nztific_FreeIdentityContent : function (ossctx:Pnzctx; identity:PnzttIdentity):nzerror;cdecl;
1169
{-------------------------- nztSign -------------------------- }
1172
* nztSign - Create an attached signature.
1175
* osscntxt IN OSS context.
1176
* persona IN Open persona acting as signer.
1177
* state IN State of signature.
1178
* inlen IN Length of this input part.
1179
* in IN This input part.
1180
* tdubuf IN/OUT TDU buffer.
1185
* NZERROR_OK Success.
1186
* NZERROR_TK_CANTGROW Needed to grow output buffer but could not.
1187
* NZERROR_TK_NOTOPEN Persona is not open.
1188
* NZERROR_TK_NOTSUPP Function not supported with persona.
1191
{$IFNDEF LinkDynamically}
1192
function nztSign(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1193
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztSign';
1195
nztSign : function(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1196
_para6:PnzttBufferBlock):nzerror;cdecl;
1199
{------------------------- nztVerify ------------------------- }
1202
* nztVerify - Verify an attached signature.
1205
* osscntxt IN OSS context.
1206
* persona IN Persona.
1207
* state IN State of verification.
1208
* intdulen IN TDU length.
1210
* out IN/OUT Extracted message.
1211
* verified OUT TRUE if signature verified.
1212
* validatedOUT TRUE if signing identity validated.
1213
* identity OUT Identity of signing party.
1218
* NZERROR_OK Success.
1219
* NZERROR_TK_CANTGROW Needed to grow outptu buffer but could not.
1220
* NZERROR_TK_NOTOPEN Persona is not open.
1221
* NZERROR_TK_NOTSUPP Function not supported with persona.
1224
{$IFNDEF LinkDynamically}
1225
function nztVerify(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1226
_para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztVerify';
1228
nztVerify : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1229
_para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;
1232
{------------------------ nztValidate ------------------------ }
1235
* nztValidate - Validate an identity.
1238
* osscntxt IN OSS context.
1239
* persona IN Persona.
1240
* identity IN Identity.
1241
* validatedOUT TRUE if identity was validated.
1246
* NZERROR_OK Success.
1247
* NZERROR_TK_NOTOPEN Persona is not open.
1248
* NZERROR_TK_NOTSUPP Function not supported with persona.
1251
{$IFNDEF LinkDynamically}
1252
function nztValidate(_para1:Pnzctx; _para2:PnzttPersona; _para3:PnzttIdentity; _para4:Pboolean):nzerror;cdecl;external ocilib name 'nztValidate';
1254
nztValidate : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PnzttIdentity; _para4:Pboolean):nzerror;cdecl;
1257
{-------------------- nztsd_SignDetached -------------------- }
1260
* nztsd_SignDetached - Generate a detached signature.
1263
* osscntxt IN OSS context.
1264
* persona IN Persona.
1265
* state IN State of signature.
1266
* inlen IN Length of this input part.
1267
* in IN This input part.
1268
* tdubuf IN/OUT TDU buffer.
1273
* NZERROR_OK Success.
1274
* NZERROR_TK_CANTGROW Needed to grow output buffer but could not.
1275
* NZERROR_TK_NOTOPEN Persona is not open.
1276
* NZERROR_TK_NOTSUPP Function not supported with persona.
1279
{$IFNDEF LinkDynamically}
1280
function nztsd_SignDetached(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1281
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztsd_SignDetached';
1283
nztsd_SignDetached : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1284
_para6:PnzttBufferBlock):nzerror;cdecl;
1287
{------------------- nztved_VerifyDetached ------------------- }
1290
* nztved_VerifyDetached - Verify a detached signature.
1293
* osscntxt IN OSS context.
1294
* persona IN Persona.
1295
* state IN State of verification.
1296
* inlen IN Length of data.
1298
* intdulen IN Input TDU length.
1300
* verified OUT TRUE if signature verified.
1301
* validatedOUT TRUE if signing identity validated.
1302
* identity OUT Identity of signing party.
1307
* NZERROR_OK Success.
1308
* NZERROR_TK_NOTOPEN Persona is not open.
1309
* NZERROR_TK_NOTSUPP Function not supported with persona.
1312
{$IFNDEF LinkDynamically}
1313
function nztved_VerifyDetached(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1314
_para6:ub4; _para7:Pub1; _para8:Pboolean; _para9:Pboolean; _para10:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztved_VerifyDetached';
1316
nztved_VerifyDetached : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1317
_para6:ub4; _para7:Pub1; _para8:Pboolean; _para9:Pboolean; _para10:PPnzttIdentity):nzerror;cdecl;
1320
{--------------------- nztkec_PKEncrypt --------------------- }
1323
* nztkec_PKEncrypt - Encrypt data symmetrically, encrypt key asymmetrically
1326
* osscntxt IN OSS context.
1327
* persona IN Persona.
1328
* nrecipients IN Number of recipients for this encryption.
1329
* recipients IN List of recipients.
1330
* state IN State of encryption.
1331
* inlen IN Length of this input part.
1332
* in IN This input part.
1333
* tdubuf IN/OUT TDU buffer.
1336
* There is a limitation of 1 recipient (nrecipients = 1) at this
1340
* NZERROR_OK Success.
1341
* NZERROR_TK_CANTGROW Needed to grow output buffer but could not.
1342
* NZERROR_TK_NOTOPEN Persona is not open.
1343
* NZERROR_TK_NOTSUPP Function not supported with persona.
1346
{$IFNDEF LinkDynamically}
1347
function nztkec_PKEncrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
1348
_para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztkec_PKEncrypt';
1350
nztkec_PKEncrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
1351
_para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;
1354
{---------------- nztxkec_PKEncryptExpansion ---------------- }
1357
* nztxkec_PKEncryptExpansion - Determine the buffer needed for PKEncrypt
1360
* osscntxt IN OSS context.
1361
* persona IN Persona.
1362
* nrecipients IN Number of recipients.
1363
* inlen IN Length of input.
1364
* tdulen out Length of buffer need.
1369
* NZERROR_OK Success.
1370
* NZERROR_TK_NOTOPEN Persona is not open.
1371
* NZERROR_TK_NOTSUPP Function not supported with persona.
1374
{$IFNDEF LinkDynamically}
1375
function nztxkec_PKEncryptExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:ub4; _para5:Pub4):nzerror;cdecl;external ocilib name 'nztxkec_PKEncryptExpansion';
1377
nztxkec_PKEncryptExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:ub4; _para5:Pub4):nzerror;cdecl;
1380
{--------------------- nztkdc_PKDecrypt --------------------- }
1383
* nztkdc_PKDecrypt - Decrypt a PKEncrypted message.
1386
* osscntxt IN OSS context.
1387
* persona IN Persona.
1388
* state IN State of encryption.
1389
* inlen IN Length of this input part.
1390
* in IN This input part.
1391
* tdubuf IN/OUT TDU buffer.
1396
* NZERROR_OK Success.
1397
* NZERROR_TK_CANTGROW Needed to grow output buffer but could not.
1398
* NZERROR_TK_NOTOPEN Persona is not open.
1399
* NZERROR_TK_NOTSUPP Function not supported with persona.
1402
{$IFNDEF LinkDynamically}
1403
function nztkdc_PKDecrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1404
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztkdc_PKDecrypt';
1406
nztkdc_PKDecrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1407
_para6:PnzttBufferBlock):nzerror;cdecl;
1410
{-------------------------- nztHash -------------------------- }
1413
* nztHash - Generate a hash.
1416
* osscntxt IN OSS context.
1417
* persona IN Persona.
1418
* state IN State of hash.
1419
* inlen IN Length of this input.
1421
* tdu IN/OUT Output tdu.
1426
* NZERROR_OK Success.
1427
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
1428
* NZERROR_TK_NOTOPEN Persona is not open.
1429
* NZERROR_TK_NOTSUPP Function not supported with persona.
1432
{$IFNDEF LinkDynamically}
1433
function nztHash(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1434
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztHash';
1436
nztHash : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
1437
_para6:PnzttBufferBlock):nzerror;cdecl;
1440
{----------------------- nztSeedRandom ----------------------- }
1443
* nztSeedRandom - Seed the random function
1446
* osscntxt IN OSS context.
1447
* persona IN Persona.
1448
* seedlen IN Length of seed.
1454
* NZERROR_OK Success.
1455
* NZERROR_TK_NOTOPEN Persona is not open.
1456
* NZERROR_TK_NOTSUPP Function not supported with persona.
1459
{$IFNDEF LinkDynamically}
1460
function nztSeedRandom(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub1):nzerror;cdecl;external ocilib name 'nztSeedRandom';
1462
nztSeedRandom : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub1):nzerror;cdecl;
1465
{--------------------- nztrb_RandomBytes --------------------- }
1468
* nztrb_RandomBytes - Generate a buffer random bytes.
1471
* osscntxt IN OSS context.
1472
* persona IN Persona.
1473
* nbytes IN Number of bytes desired.
1474
* out IN/OUT Buffer block for bytes.
1479
* NZERROR_OK Success.
1480
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
1481
* NZERROR_TK_NOTOPEN Persona is not open.
1482
* NZERROR_TK_NOTSUPP Function not supported with persona.
1485
{$IFNDEF LinkDynamically}
1486
function nztrb_RandomBytes(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztrb_RandomBytes';
1488
nztrb_RandomBytes : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttBufferBlock):nzerror;cdecl;
1491
{-------------------- nztrn_RandomNumber -------------------- }
1494
* nztrn_RandomNumber - Generate a random number
1497
* osscntxt IN OSS context.
1498
* persona IN Persona.
1504
* NZERROR_OK Success.
1505
* NZERROR_TK_NOTOPEN Persona is not open.
1506
* NZERROR_TK_NOTSUPP Function not supported with persona.
1509
{$IFNDEF LinkDynamically}
1510
function nztrn_RandomNumber(_para1:Pnzctx; _para2:PnzttPersona; _para3:Puword):nzerror;cdecl;external ocilib name 'nztrn_RandomNumber';
1512
nztrn_RandomNumber : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:Puword):nzerror;cdecl;
1515
{---------------------- nztbbInitBlock ---------------------- }
1518
* nztbbInitBlock - Initialize a buffer block.
1521
* osscntxt IN OSS context.
1522
* block IN/OUT Buffer block.
1525
* The buffer block is initialized to be empty (all members are set
1526
* to 0/NULL). Such a block will be allocated memory as needed.
1529
* NZERROR_OK Success.
1532
{$IFNDEF LinkDynamically}
1533
function nztbbInitBlock(_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbInitBlock';
1535
nztbbInitBlock : function (_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;
1538
{---------------------- nztbbReuseBlock ---------------------- }
1541
* nztbbReuseBlock - Reuse an already initialized and possibly used block.
1544
* osscntxt IN OSS context.
1545
* block IN/OUT Buffer block.
1548
* This function simply sets the used length member of the buffer
1549
* block to 0. If the block already has memory allocated to it,
1550
* this will cause it to be reused.
1553
* NZERROR_OK Success.
1556
{$IFNDEF LinkDynamically}
1557
function nztbbReuseBlock(_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbReuseBlock';
1559
nztbbReuseBlock : function (_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;
1562
{---------------------- nztbbSizeBlock ---------------------- }
1565
* nztbbSizeBlock - Size an initialized block to a particular size.
1568
* osscntxt IN OSS context.
1569
* len IN Minimum number of unused bytes desired.
1570
* block IN/OUT Buffer block.
1575
* NZERROR_OK Success.
1578
{$IFNDEF LinkDynamically}
1579
function nztbbSizeBlock(_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbSizeBlock';
1581
nztbbSizeBlock : function (_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;
1584
{----------------------- nztbbGrowBlock ----------------------- }
1587
* nzbbGrowBlock - Increase the size of the buffer block.
1590
* osscntxt IN OSS context.
1591
* inc IN Number of bytes to increase.
1592
* block IN/OUT Buffer block.
1597
* NZERROR_OK Success.
1600
{$IFNDEF LinkDynamically}
1601
function nztbbGrowBlock(_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbGrowBlock';
1603
nztbbGrowBlock : function (_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;
1606
{---------------------- nztbbPurgeBlock ---------------------- }
1609
* nztbbPurgeBlock - Purge a buffer block of its memory.
1612
* osscntxt IN OSS context.
1613
* block IN/OUT Buffer block.
1616
* The memory used by the buffer block as the buffer is released.
1617
* The buffer block itself is not affected.
1620
* NZERROR_OK Success.
1623
{$IFNDEF LinkDynamically}
1624
function nztbbPurgeBlock(_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbPurgeBlock';
1626
nztbbPurgeBlock : function (_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;
1629
{----------------------- nztbbSetBlock ----------------------- }
1632
* nztbbSetBlock - Set a buffer block to a known state.
1635
* osscntxt IN OSS context.
1636
* flags IN Flags to set.
1637
* buflen IN Length of buffer.
1638
* usedlen IN Used length.
1640
* block IN/OUT Buffer block
1643
* If buflen > 0, objlen == 0, and obj == NULL, then buflen bytes
1644
* of memory is allocated and a pointer is stored in the buffer
1647
* The buffer parameter remains unchanged.
1650
* NZERROR_OK Success.
1653
{$IFNDEF LinkDynamically}
1654
function nztbbSetBlock(_para1:Pnzctx; _para2:uword; _para3:ub4; _para4:ub4; _para5:Pub1;
1655
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbSetBlock';
1657
nztbbSetBlock : function (_para1:Pnzctx; _para2:uword; _para3:ub4; _para4:ub4; _para5:Pub1;
1658
_para6:PnzttBufferBlock):nzerror;cdecl;
1661
{--------------------- nztiGetSecInfo --------------------- }
1664
* nztiGetSecInfo - Get some security information for SSL
1667
* Name IN/OUT Description
1668
* osscntxt IN OSS context.
1669
* persona IN persona
1670
* dname OUT distinguished name of the certificate
1671
* dnamelen OUT length of the distinguished name
1672
* issuername OUT issuer name of the certificate
1673
* certhash OUT SHA1 hash of the certificate
1674
* certhashlenOUT length of the hash
1676
* This function allocate memories for issuername, certhash, and dname.
1677
* To deallocate memory for those params, you should call nztdbuf_DestroyBuf.
1682
{$IFNDEF LinkDynamically}
1683
function nztiGetSecInfo(_para1:Pnzctx; _para2:PnzttPersona; _para3:PPtext; _para4:Pub4; _para5:PPtext;
1684
_para6:Pub4; _para7:PPub1; _para8:Pub4):nzerror;cdecl;external ocilib name 'nztiGetSecInfo';
1686
nztiGetSecInfo : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PPtext; _para4:Pub4; _para5:PPtext;
1687
_para6:Pub4; _para7:PPub1; _para8:Pub4):nzerror;cdecl;
1690
{---------------------- nztiGetDName ---------------------- }
1693
* nztiGetDName - Get the distinguished name for the given identity
1696
* Name IN/OUT Description
1697
* osscntxt IN OSS context.
1698
* identity IN identity need to get dname from
1699
* dn OUT distinguished name
1700
* dnlen OUT length of the dname
1708
{$IFNDEF LinkDynamically}
1709
function nztiGetDName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztiGetDName';
1711
nztiGetDName : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;
1714
{------------------- nztiGetIssuerName ------------------- }
1717
* nztiGetIssuerName - Get IssuerName for the given identity
1720
* Name IN/OUT Description
1721
* osscntxt IN OSS context.
1722
* identity IN identity need to get issuername from
1723
* issuername OUT issuer's name
1724
* issuernamelen OUT length of the issuer's name
1732
{$IFNDEF LinkDynamically}
1733
function nztiGetIssuerName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztiGetIssuerName';
1735
nztiGetIssuerName : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;
1738
{-------------------- nztgch_GetCertHash -------------------- }
1741
* nztgch_GetCertHash - Get SHA1 hash for the certificate of the identity
1744
* Name IN/OUT Description
1745
* osscntxt IN OSS context.
1746
* identity IN identity need to get issuername from
1747
* certHash OUT certHash buffer
1748
* hashLen OUT length of the certHash
1751
* Need to call nztdbuf_DestroyBuf to deallocate memory for certHash.
1756
{$IFNDEF LinkDynamically}
1757
function nztgch_GetCertHash(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztgch_GetCertHash';
1759
nztgch_GetCertHash : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
1762
{-------------------- nztdbuf_DestroyBuf -------------------- }
1765
* nztdbuf_DestroyBuf - Deallocation funtions for ub1 and text buffer
1768
* Name IN/OUT Description
1769
* osscntxt IN OSS context.
1770
* buf IN Allocated buffer to be destroyed.
1778
{$IFNDEF LinkDynamically}
1779
function nztdbuf_DestroyBuf(_para1:Pnzctx; _para2:PPdvoid):nzerror;cdecl;external ocilib name 'nztdbuf_DestroyBuf';
1781
nztdbuf_DestroyBuf : function (_para1:Pnzctx; _para2:PPdvoid):nzerror;cdecl;
1784
{----------------------- nztGetCertChain ----------------------- }
1790
* Name IN/OUT Description
1791
* osscntxt IN OSS context.
1799
{$IFNDEF LinkDynamically}
1800
function nztGetCertChain(_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;external ocilib name 'nztGetCertChain';
1802
nztGetCertChain : function (_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;
1805
{----------------------- nztCompareDN ----------------------- }
1811
* Name IN/OUT Description
1812
* osscntxt IN OSS context.
1813
* dn1 IN distinguished name 1
1814
* dn2 IN distinguished name 2
1819
* NZERROR_OK succeeded
1824
{$IFNDEF LinkDynamically}
1825
function nztCompareDN(_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:Pub1; _para5:ub4;
1826
_para6:Pboolean):nzerror;cdecl;external ocilib name 'nztCompareDN';
1828
nztCompareDN : function (_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:Pub1; _para5:ub4;
1829
_para6:Pboolean):nzerror;cdecl;
1832
{$ifdef NZ_OLD_TOOLS}
1833
{--------------------- nztIdentityAlloc --------------------- }
1836
* nztIdentityAlloc - Allocate memory for nzttIdentity context
1839
* Name IN/OUT Description
1840
* osscntxt IN OSS context.
1841
* identity OUT nzttIdentity context
1846
* NZERROR_OK succeeded
1851
{$IFNDEF LinkDynamically}
1852
function nztIdentityAlloc(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztIdentityAlloc';
1854
nztIdentityAlloc : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
1857
{--------------------- nztIPrivateAlloc --------------------- }
1860
* nztIPrivateAlloc - Allocate memory for nzttIdentityPrivate
1863
* Name IN/OUT Description
1865
* osscntxt IN OSS context.
1866
* ipriv OUT identityPrivate structure
1870
* NZERROR_OK succeeded
1875
{$IFNDEF LinkDynamically}
1876
function nztIPrivateAlloc(_para1:Pnzctx; _para2:PPnzttIdentityPrivate):nzerror;cdecl;external ocilib name 'nztIPrivateAlloc';
1878
nztIPrivateAlloc : function (_para1:Pnzctx; _para2:PPnzttIdentityPrivate):nzerror;cdecl;
1881
{---------------------- nztIDupContent ---------------------- }
1887
* Name IN/OUT Description
1888
* osscntxt IN OSS context.
1889
* targetIdentityOUT target identity
1890
* sourceIdentity IN source identity
1894
* NZERROR_OK succeeded
1899
{$IFNDEF LinkDynamically}
1900
function nztIDupContent(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PnzttIdentity):nzerror;cdecl;external ocilib name 'nztIDupContent';
1902
nztIDupContent : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PnzttIdentity):nzerror;cdecl;
1905
{---------------------- nztIPDuplicate ---------------------- }
1911
* Name IN/OUT Description
1912
* osscntxt IN OSS context.
1913
* target_ipriv OUT target identityPrivate
1914
* source_ipriv IN source identityPrivate
1919
* NZERROR_OK succeeded
1924
{$IFNDEF LinkDynamically}
1925
function nztIPDuplicate(_para1:Pnzctx; _para2:PPnzttIdentityPrivate; _para3:PnzttIdentityPrivate):nzerror;cdecl;external ocilib name 'nztIPDuplicate';
1927
nztIPDuplicate : function (_para1:Pnzctx; _para2:PPnzttIdentityPrivate; _para3:PnzttIdentityPrivate):nzerror;cdecl;
1930
{--------------------- nztiDupIdentList --------------------- }
1933
* nztiDupIdentList -
1936
* Name IN/OUT Description
1937
* osscntxt IN OSS context.
1938
* source_identities IN source identity list
1939
* numIdent OUT number of identity in the list
1940
* ppidentity OUT Target of identity
1945
* NZERROR_OK succeeded
1950
{$IFNDEF LinkDynamically}
1951
function nztiDupIdentList(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiDupIdentList';
1953
nztiDupIdentList : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:PPnzttIdentity):nzerror;cdecl;
1956
{--------------------- nztFreeIdentList --------------------- }
1959
* nztFreeIdentList - Free memory for a list of Identities
1962
* Name IN/OUT Description
1963
* osscntxt IN OSS context.
1964
* identity IN identity context
1969
* NZERROR_OK succeeded
1974
{$IFNDEF LinkDynamically}
1975
function nztFreeIdentList(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztFreeIdentList';
1977
nztFreeIdentList : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
1982
{--------------------- nztCheckVaLidity --------------------- }
1985
* nztCheckVaLidity - Check the validity of certificate
1988
* Name IN/OUT Description
1989
* osscntxt IN OSS context.
1990
* start_time Start time of the certificate
1991
* end_time End time of the certificate
1996
* NZERROR_OK succeeded
2001
{$IFNDEF LinkDynamically}
2002
function nztCheckValidity(_para1:Pnzctx; _para2:ub4; _para3:ub4):nzerror;cdecl;external ocilib name 'nztCheckValidity';
2004
nztCheckValidity : function (_para1:Pnzctx; _para2:ub4; _para3:ub4):nzerror;cdecl;
2007
{--------------------- nztwCreateWallet --------------------- }
2010
* nztwCreateWallet - Create a new wallet.
2013
* osscntxt IN OSS context.
2014
* wrllen IN Length of wallet resource locator.
2016
* pwdlen IN Length of password (see notes below).
2018
* wallet IN/OUT Wallet.
2021
* It is an error to try to create a wallet that already exists.
2022
* The previously existing wallet must be destroyed first.
2024
* The wallet itself is not encrypted. Rather, all the personas in
2025
* the wallet are encrypted under the same password. A hash of the
2026
* password is stored in the wallet.
2028
* Upon success, an empty open wallet is stored in the wallet
2032
* NZERROR_OK Sucess.
2033
* NZERROR_TK_WALLET_EXISTS Wallet already exists.
2034
* NZERROR_RIO_OPEN RIO could not create wallet (see trace file).
2037
{$IFNDEF LinkDynamically}
2038
function nztwCreateWallet(_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
2039
_para6:PnzttWallet):nzerror;cdecl;external ocilib name 'nztwCreateWallet';
2041
nztwCreateWallet : function (_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
2042
_para6:PnzttWallet):nzerror;cdecl;
2045
{--------------------- nztwDestroyWallet --------------------- }
2048
* nztwDestroyWallet - Destroy an existing wallet.
2051
* osscntxt IN OSS context.
2052
* wrllen IN Length of wallet resource locator.
2054
* pwdlen IN Length of password.
2059
* NZERROR_OK Success.
2060
* NZERROR_TK_PASSWORD Password verification failed.
2061
* NZERROR_RIO_OPEN RIO could not open wallet (see trace file).
2062
* NZERROR_RIO_DELETE Delete failed (see trace file).
2065
{$IFNDEF LinkDynamically}
2066
function nztwDestroyWallet(_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext):nzerror;cdecl;external ocilib name 'nztwDestroyWallet';
2068
nztwDestroyWallet : function (_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext):nzerror;cdecl;
2071
{--------------------- nzteStorePersona --------------------- }
2074
* nzteStorePersona - Store an open persona in a wallet.
2077
* osscntxt IN OSS context.
2078
* persona IN/OUT Persona.
2079
* wallet IN/OUT Wallet.
2082
* If the open persona is not associated with any wallet (it was
2083
* created via the nzteClosePersona function), then storing the
2084
* persona creates that association. The wallet will also have an
2085
* updated persona list that reflects this association.
2087
* If the open persona was associated with wallet 'A' (it was
2088
* opened via the nztwOpenWallet function), and is stored back into
2089
* wallet 'A', then then the old persona is overwritten by the new
2090
* persona if the password can be verified. Recall that all
2091
* personas have a unique identity id. If that id changes then
2092
* storing the persona will put a new persona in the wallet.
2094
* If the open persona was associated with wallet 'A' and is stored
2095
* into wallet 'B', and if wallet 'B' does not contain a persona
2096
* with that unique identity id, then the persona will be copied
2097
* into wallet 'B', wallet 'B''s persona list will be updated, and
2098
* the persona structure will be updated to be associated with
2099
* wallet 'B'. If wallet 'B' already contained the persona, it
2100
* would be overwritten by the new persona.
2102
* The persona parameter is doubly indirect so that at the
2103
* conclusion of the function call, the pointer can be directed to
2104
* the persona in the wallet.
2107
* NZERROR_OK Success.
2108
* NZERROR_TK_PASSWORD Password verification failed.
2109
* NZERROR_RIO_STORE Store failed (see network trace file).
2112
{$IFNDEF LinkDynamically}
2113
function nzteStorePersona(_para1:Pnzctx; _para2:PPnzttPersona; _para3:PnzttWallet):nzerror;cdecl;external ocilib name 'nzteStorePersona';
2115
nzteStorePersona : function (_para1:Pnzctx; _para2:PPnzttPersona; _para3:PnzttWallet):nzerror;cdecl;
2118
{--------------------- nzteRemovePersona --------------------- }
2121
* nzteRemovePersona - Remove a persona from the wallet.
2124
* osscntxt IN OSS context.
2125
* persona IN/OUT Persona.
2128
* The password is verified before trying to remove the persona.
2130
* If the persona is open, it is closed. The persona is removed
2131
* from the wallet list and the persona pointer is set to NULL.
2133
* A double indirect pointer to the persona is required so that the
2134
* persona pointer can be set to NULL upon completion.
2137
* NZERROR_OK Success.
2138
* NZERROR_TK_PASSWORD Password verification failed.
2139
* NZERROR_RIO_DELETE Delete failed.
2142
{$IFNDEF LinkDynamically}
2143
function nzteRemovePersona(_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteRemovePersona';
2145
nzteRemovePersona : function (_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;
2148
{--------------------- nzteCreatePersona --------------------- }
2151
* nzteCreatePersona - Create a persona.
2154
* osscntxt IN OSS context.
2155
* itype IN Identity type.
2156
* ctype IN Cipher type.
2157
* desc IN Persona description.
2158
* persona OUT Persona.
2161
* The resulting persona is created in the open state, but it will
2162
* not be associated with a wallet.
2164
* The memory for the persona is allocated by the function.
2167
* NZERROR_OK Success.
2168
* NZERROR_TK_TYPE Unsupported itype/ctype combination.
2169
* NZERROR_TK_PARMS Error in persona description.
2172
{$IFNDEF LinkDynamically}
2173
function nzteCreatePersona(_para1:Pnzctx; _para2:nzttVersion; _para3:nzttCipherType; _para4:PnzttPersonaDesc; _para5:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteCreatePersona';
2175
nzteCreatePersona : function (_para1:Pnzctx; _para2:nzttVersion; _para3:nzttCipherType; _para4:PnzttPersonaDesc; _para5:PPnzttPersona):nzerror;cdecl;
2178
{----------------- nztiStoreTrustedIdentity ----------------- }
2181
* nztiStoreTrustedIdentity - Store an identity into a persona.
2184
* osscntxt IN Success.
2185
* identity IN/OUT Trusted Identity.
2186
* persona IN/OUT Persona.
2189
* The identity is not saved with the persona in the wallet until
2190
* the persona is stored.
2192
* The identity parameter is double indirect so that it can point
2193
* into the persona at the conclusion of the call.
2196
* NZERROR_OK Success.
2199
{$IFNDEF LinkDynamically}
2200
function nztiStoreTrustedIdentity(_para1:Pnzctx; _para2:PPnzttIdentity; _para3:PnzttPersona):nzerror;cdecl;external ocilib name 'nztiStoreTrustedIdentity';
2202
nztiStoreTrustedIdentity : function (_para1:Pnzctx; _para2:PPnzttIdentity; _para3:PnzttPersona):nzerror;cdecl;
2205
{--------------------- nzteSetProtection --------------------- }
2208
* nzteSetProtection - Set the protection type for a CE function.
2211
* osscntxt IN OSS context.
2212
* persona IN/OUT Persona.
2213
* func IN CE function.
2214
* tdufmt IN TDU Format.
2215
* protinfo IN Protection information specific to this format.
2220
* NZERROR_OK Success.
2221
* NZERROR_TK_PROTECTION Unsupported protection.
2222
* NZERROR_TK_PARMS Error in protection info.
2225
{$IFNDEF LinkDynamically}
2226
function nzteSetProtection(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:nztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;external ocilib name 'nzteSetProtection';
2228
nzteSetProtection : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:nztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;
2231
{--------------------- nzteGetProtection --------------------- }
2234
* nzteGetProtection - Get the protection type for a CE function.
2237
* osscntxt IN OSS context.
2238
* persona IN Persona.
2239
* func IN CE function.
2240
* tdufmt OUT TDU format.
2241
* protinfo OUT Protection information.
2246
* NZERROR_OK Success.
2249
{$IFNDEF LinkDynamically}
2250
function nzteGetProtection(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:Pnztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;external ocilib name 'nzteGetProtection';
2252
nzteGetProtection : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:Pnztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;
2255
{-------------------- nztiRemoveIdentity -------------------- }
2258
* nztiRemoveIdentity - Remove an identity from an open persona.
2261
* osscntxt IN OSS context.
2262
* identity IN/OUT Identity.
2265
* If the persona is not stored, this identity will still be in the
2266
* persona stored in the wallet.
2268
* The identity parameter is doubly indirect so that at the
2269
* conclusion of the function, the pointer can be set to NULL.
2272
* NZERROR_OK Success.
2273
* NZERROR_TK_NOTFOUND Identity not found.
2274
* NZERROR_TK_NOTOPEN Persona is not open.
2277
{$IFNDEF LinkDynamically}
2278
function nztiRemoveIdentity(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiRemoveIdentity';
2280
nztiRemoveIdentity : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
2283
{----------------- nztifdn ----------------- }
2286
* nztifdn - create an Identity From a Distinguished Name
2289
* osscntxt IN OSS context.
2290
* length IN Length of the distinguished name
2291
* distinguished_name IN distinguished name string
2292
* ppidentity OUT created identity
2295
* Given a distinguished name, return the identity that corresponds to it.
2298
* NZERROR_OK Success.
2301
{$IFNDEF LinkDynamically}
2302
function nztifdn(ossctx:Pnzctx; length:ub4; distinguished_name:Ptext; ppidentity:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztifdn';
2304
nztifdn : function (ossctx:Pnzctx; length:ub4; distinguished_name:Ptext; ppidentity:PPnzttIdentity):nzerror;cdecl;
2307
{--------------------- nztxSignExpansion --------------------- }
2310
* nztxSignExpansion - Determine the size of the attached signature buffer.
2313
* osscntxt IN OSS context.
2314
* persona IN Persona.
2315
* inlen IN Length of input.
2316
* tdulen OUT Buffer needed for signature.
2321
* NZERROR_OK Success.
2322
* NZERROR_TK_NOTOPEN Persona is not open.
2323
* NZERROR_TK_NOTSUPP Function not supported with persona.
2326
{$IFNDEF LinkDynamically}
2327
function nztxSignExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxSignExpansion';
2329
nztxSignExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
2332
{--------------- nztxsd_SignDetachedExpansion --------------- }
2335
* nztxsd_SignDetachedExpansion - Determine the size of buffer needed.
2338
* osscntxt IN OSS context.
2339
* persona IN Persona.
2340
* inlen IN Length of input.
2341
* tdulen OUT Buffer needed for signature.
2346
* NZERROR_OK Success.
2347
* NZERROR_TK_NOTOPEN Persona is not open.
2348
* NZERROR_TK_NOTSUPP Function not supported with persona.
2351
{$IFNDEF LinkDynamically}
2352
function nztxsd_SignDetachedExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxsd_SignDetachedExpansion';
2354
nztxsd_SignDetachedExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
2357
{------------------------ nztEncrypt ------------------------ }
2360
* nztEncrypt - Symmetrically encrypt
2363
* osscntxt IN OSS context.
2364
* persona IN Persona.
2365
* inlen IN Length of this input part.
2366
* in IN This input part.
2367
* tdubuf IN/OUT TDU buffer.
2372
* NZERROR_OK Success.
2373
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
2374
* NZERROR_TK_NOTOPEN Persona is not open.
2375
* NZERROR_TK_NOTSUPP Function not supported with persona.
2378
{$IFNDEF LinkDynamically}
2379
function nztEncrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
2380
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztEncrypt';
2382
nztEncrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
2383
_para6:PnzttBufferBlock):nzerror;cdecl;
2386
{------------------- nztxEncryptExpansion ------------------- }
2389
* nztxEncryptExpansion - Determine the size of the TDU to encrypt.
2392
* osscntxt IN OSS context.
2393
* persona IN Persona.
2394
* inlen IN Length of this input part.
2395
* tdulen OUT Length of TDU.
2400
* NZERROR_OK Success.
2401
* NZERROR_TK_NOTOPEN Persona is not open.
2402
* NZERROR_TK_NOTSUPP Function not supported with persona.
2405
{$IFNDEF LinkDynamically}
2406
function nztxEncryptExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxEncryptExpansion';
2408
nztxEncryptExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
2411
{------------------------ nztDecrypt ------------------------ }
2414
* nztDecrypt - Decrypt an Encrypted message.
2417
* osscntxt IN OSS context.
2418
* persona IN Persona.
2419
* state IN State of decryption.
2420
* inlen IN Length of this input part.
2421
* in IN This input part.
2422
* out IN/OUT Cleartext message.
2427
* NZERROR_OK Success.
2428
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
2429
* NZERROR_TK_NOTOPEN Persona is not open.
2430
* NZERROR_TK_NOTSUPP Function not supported with persona.
2433
{$IFNDEF LinkDynamically}
2434
function nztDecrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
2435
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztDecrypt';
2437
nztDecrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
2438
_para6:PnzttBufferBlock):nzerror;cdecl;
2441
{------------------------ nztEnvelope ------------------------ }
2444
* nztEnvelope - Sign and PKEncrypt a message.
2447
* osscntxt IN OSS context.
2448
* persona IN Persona.
2449
* nrecipients IN Number of recipients for this encryption.
2450
* recipients IN List of recipients.
2451
* state IN State of encryption.
2452
* inlen IN Length of this input part.
2453
* in IN This input part.
2454
* tdubuf IN/OUT TDU buffer.
2459
* NZERROR_OK Success.
2460
* NZERROR_TK_CANTGROW Needed to grow output buffer but could not.
2461
* NZERROR_TK_NOTOPEN Persona is not open.
2462
* NZERROR_TK_NOTSUPP Function not supported with persona.
2465
{$IFNDEF LinkDynamically}
2466
function nztEnvelope(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
2467
_para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztEnvelope';
2469
nztEnvelope : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
2470
_para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;
2473
{----------------------- nztDeEnvelope ----------------------- }
2476
* nztDeEnvelope - PKDecrypt and verify a message.
2479
* osscntxt IN OSS context.
2480
* persona IN Persona.
2481
* state IN State of encryption.
2482
* inlen IN Length of this input part.
2483
* in IN This input part.
2484
* out OUT Message from TDU.
2485
* verified OUT TRUE if verified.
2486
* validated OUT TRUE if validated.
2487
* sender OUT Identity of sender.
2492
* NZERROR_OK Success.
2493
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
2494
* NZERROR_TK_NOTOPEN Persona is not open.
2495
* NZERROR_TK_NOTSUPP Function not supported with persona.
2498
{$IFNDEF LinkDynamically}
2499
function nztDeEnvelope(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
2500
_para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztDeEnvelope';
2502
nztDeEnvelope : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
2503
_para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;
2506
{----------------------- nztKeyedHash ----------------------- }
2509
* nztKeyedHash - Generate a keyed hash.
2512
* osscntxt IN OSS context.
2513
* persona IN Persona.
2514
* state IN State of hash.
2515
* inlen IN Length of this input.
2517
* tdu IN/OUT Output tdu.
2522
* NZERROR_OK Success.
2523
* NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not.
2524
* NZERROR_TK_NOTOPEN Persona is not open.
2525
* NZERROR_TK_NOTSUPP Function not supported with persona.
2528
{$IFNDEF LinkDynamically}
2529
function nztKeyedHash(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
2530
_para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztKeyedHash';
2532
nztKeyedHash : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
2533
_para6:PnzttBufferBlock):nzerror;cdecl;
2536
{------------------ nztxKeyedHashExpansion ------------------ }
2539
* nztxKeyedHashExpansion - Determine the space needed for a keyed hash.
2542
* osscntxt IN OSS context.
2543
* persona IN Persona.
2544
* inlen IN Length of this input.
2545
* tdulen OUT TDU length.
2550
* NZERROR_OK Success.
2551
* NZERROR_TK_NOTOPEN Persona is not open.
2552
* NZERROR_TK_NOTSUPP Function not supported with persona.
2555
{$IFNDEF LinkDynamically}
2556
function nztxKeyedHashExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxKeyedHashExpansion';
2558
nztxKeyedHashExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
2561
{--------------------- nztxHashExpansion --------------------- }
2564
* nztxHashExpansion - Determine the size of the TDU for a hash.
2567
* osscntxt IN OSS context.
2568
* persona IN Persona.
2569
* inlen IN Length of this input.
2570
* tdulen OUT TDU length.
2575
* NZERROR_OK Success.
2576
* NZERROR_TK_NOTOPEN Persona is not open.
2577
* NZERROR_TK_NOTSUPP Function not supported with persona.
2580
{$IFNDEF LinkDynamically}
2581
function nztxHashExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxHashExpansion';
2583
nztxHashExpansion : function(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
2586
{---------------- nztiae_IsAuthEnabled ---------------- }
2589
* nztiae_IsAuthEnabled - Checks to see if Authentication is Enabled
2590
* in the current Cipher Spec.
2593
* ctx IN Oracle SSL Context
2594
* ncipher IN CipherSuite
2595
* authEnabled OUT Boolean for is Auth Enabled?
2600
* NZERROR_OK on success.
2601
* NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
2604
{$IFNDEF LinkDynamically}
2605
function nztiae_IsAuthEnabled(_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;external ocilib name 'nztiae_IsAuthEnabled';
2607
nztiae_IsAuthEnabled : function (_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;
2610
{---------------- nztiee_IsEncrEnabled ---------------- }
2613
* nztiee_IsEncrEnabled - Checks to see if Encryption is Enabled
2614
* in the current Cipher Spec.
2617
* ctx IN Oracle SSL Context
2618
* ncipher IN CipherSuite
2619
* EncrEnabled OUT Boolean for is Auth Enabled?
2624
* NZERROR_OK on success.
2625
* NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
2628
{$IFNDEF LinkDynamically}
2629
function nztiee_IsEncrEnabled(_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;external ocilib name 'nztiee_IsEncrEnabled';
2631
nztiee_IsEncrEnabled : function (_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;
2634
{---------------- nztihe_IsHashEnabled ---------------- }
2637
* nztihe_IsHashEnabled - Checks to see if HAshing is Enabled
2638
* in the current Cipher Spec.
2641
* ctx IN Oracle SSL Context
2642
* ncipher IN CipherSuite
2643
* hashEnabled OUT Boolean for is Auth Enabled?
2648
* NZERROR_OK on success.
2649
* NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
2652
{$IFNDEF LinkDynamically}
2653
function nztihe_IsHashEnabled(_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;external ocilib name 'nztihe_IsHashEnabled';
2655
nztihe_IsHashEnabled : function (_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;
2661
{$IFNDEF LinkDynamically}
2663
function nztGetIssuerName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetIssuerName';
2666
function nztGetSubjectName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetSubjectName';
2669
function nztGetBase64Cert(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetBase64Cert';
2671
function nztGetSerialNumber(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetSerialNumber';
2673
function nztGetValidDate(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetValidDate';
2675
function nztGetVersion(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pnzstrc):nzerror;cdecl;external ocilib name 'nztGetVersion';
2677
function nztGetPublicKey(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetPublicKey';
2679
function nztGenericDestroy(_para1:Pnzctx; _para2:PPub1):nzerror;cdecl;external ocilib name 'nztGenericDestroy';
2681
function nztSetAppDefaultLocation(_para1:Pnzctx; _para2:Ptext; _para3:size_t):nzerror;cdecl;external ocilib name 'nztSetAppDefaultLocation';
2683
function nztSearchNZDefault(_para1:Pnzctx; _para2:Pboolean):nzerror;cdecl;external ocilib name 'nztSearchNZDefault';
2685
nztGetIssuerName : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
2688
nztGetSubjectName: function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
2691
nztGetBase64Cert : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
2693
nztGetSerialNumber : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
2695
nztGetValidDate : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:Pub4):nzerror;cdecl;
2697
nztGetVersion : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pnzstrc):nzerror;cdecl;
2699
nztGetPublicKey : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
2701
nztGenericDestroy : function(_para1:Pnzctx; _para2:PPub1):nzerror;cdecl;
2703
nztSetAppDefaultLocation : function(_para1:Pnzctx; _para2:Ptext; _para3:size_t):nzerror;cdecl;
2705
nztSearchNZDefault : function(_para1:Pnzctx; _para2:Pboolean):nzerror;cdecl;