nzt.inc 92 KB

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