📄 nzt.h
字号:
/* * NAME * nztIdentityAlloc - Allocate memory for nzttIdentity context * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * identity {OUT} nzttIdentity context * * NOTES * * RETURNS * NZERROR_OK succeeded * others failed * */#ifdef __STDC__nzerror nztIdentityAlloc(nzctx *, nzttIdentity **);#elsenzerror nztIdentityAlloc(/*_ nzctx *, nzttIdentity ** _*/);#endif/* __STDC__ *//*--------------------- nztIPrivateAlloc ---------------------*//* * NAME * nztIPrivateAlloc - Allocate memory for nzttIdentityPrivate * * PARAMETERS * Name {IN/OUT} Description * * osscntxt {IN} OSS context. * ipriv {OUT} identityPrivate structure * NOTES * * RETURNS * NZERROR_OK succeeded * others failed * */#ifdef __STDC__nzerror nztIPrivateAlloc( nzctx *, nzttIdentityPrivate **);#elsenzerror nztIPrivateAlloc( nzctx *, nzttIdentityPrivate **);#endif /* __STDC__ *//*---------------------- nztIDupContent ----------------------*//* * NAME * nztIDupContent - * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * targetIdentity{OUT} target identity * sourceIdentity {IN} source identity * NOTES * * RETURNS * NZERROR_OK succeeded * others failed * */#ifdef __STDC__nzerror nztIDupContent( nzctx *, nzttIdentity *, nzttIdentity *);#elsenzerror nztIDupContent(/*_ nzctx *, nzttIdentity *, nzttIdentity * _*/);#endif/*---------------------- nztIPDuplicate ----------------------*//* * NAME * nztIPDuplicate - * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * target_ipriv {OUT} target identityPrivate * source_ipriv {IN} source identityPrivate * * NOTES * * RETURNS * NZERROR_OK succeeded * others failed * */#ifdef __STDC__nzerror nztIPDuplicate( nzctx *, nzttIdentityPrivate **, nzttIdentityPrivate *);#elsenzerror nztIPDuplicate(/*_ nzctx *, nzttIdentityPrivate **, nzttIdentityPrivate * _*/);#endif /* __STDC__ *//*--------------------- nztiDupIdentList ---------------------*//* * NAME * nztiDupIdentList - * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * source_identities {IN} source identity list * numIdent {OUT} number of identity in the list * ppidentity {OUT} Target of identity * * NOTES * * RETURNS * NZERROR_OK succeeded * others failed * */#ifdef __STDC__nzerror nztiDupIdentList( nzctx *, nzttIdentity *, ub4 *, nzttIdentity **);#elsenzerror nztiDupIdentList(/*_ nzctx *, nzttIdentity *, ub4 *, nzttIdentity ** _*/);#endif/*--------------------- nztFreeIdentList ---------------------*//* * NAME * nztFreeIdentList - Free memory for a list of Identities * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * identity {IN} identity context * * NOTES * * RETURNS * NZERROR_OK succeeded * others failed * */#ifdef __STDC__nzerror nztFreeIdentList( nzctx *, nzttIdentity **);#elsenzerror nztFreeIdentList(/*_ nzctx *, nzttIdentity ** _*/);#endif#endif /* NZ_OLD_TOOLS *//*--------------------- nztCheckVaLidity ---------------------*//* * NAME * nztCheckVaLidity - Check the validity of certificate * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * start_time Start time of the certificate * end_time End time of the certificate * * NOTES * * RETURNS * NZERROR_OK succeeded * others failed * */#ifdef __STDC__nzerror nztCheckValidity( nzctx *, ub4 , ub4 );#elsenzerror nztCheckValidity(/*_ nzctx *, ub4 , ub4 _*/);#endif/*--------------------- nztwCreateWallet ---------------------*//* * NAME * nztwCreateWallet - Create a new wallet. * * PARAMETERS * osscntxt {IN} OSS context. * wrllen {IN} Length of wallet resource locator. * wrl {IN} WRL. * pwdlen {IN} Length of password (see notes below). * pwd {IN} Password. * wallet {IN/OUT} Wallet. * * NOTES * It is an error to try to create a wallet that already exists. * The previously existing wallet must be destroyed first. * * The wallet itself is not encrypted. Rather, all the personas in * the wallet are encrypted under the same password. A hash of the * password is stored in the wallet. * * Upon success, an empty open wallet is stored in the wallet * parameter. * * RETURNS * NZERROR_OK Sucess. * NZERROR_TK_WALLET_EXISTS Wallet already exists. * NZERROR_RIO_OPEN RIO could not create wallet (see trace file). */#ifdef __STDC__nzerror nztwCreateWallet(nzctx *, ub4, text *, ub4, text *, nzttWallet *);#elsenzerror nztwCreateWallet(/*_ nzctx *, ub4, text *, ub4, text *, nzttWallet * _*/);#endif /* __STDC__ *//*--------------------- nztwDestroyWallet ---------------------*//* * NAME * nztwDestroyWallet - Destroy an existing wallet. * * PARAMETERS * osscntxt {IN} OSS context. * wrllen {IN} Length of wallet resource locator. * wrl {IN} WRL. * pwdlen {IN} Length of password. * pwd {IN} Password. * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_PASSWORD Password verification failed. * NZERROR_RIO_OPEN RIO could not open wallet (see trace file). * NZERROR_RIO_DELETE Delete failed (see trace file). */#ifdef __STDC__nzerror nztwDestroyWallet(nzctx *, ub4, text *, ub4, text *);#elsenzerror nztwDestroyWallet(/*_ nzctx *, ub4, text *, ub4, text * _*/);#endif /* __STDC __*//*--------------------- nzteStorePersona ---------------------*//* * NAME * nzteStorePersona - Store an open persona in a wallet. * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN/OUT} Persona. * wallet {IN/OUT} Wallet. * * NOTES * If the open persona is not associated with any wallet (it was * created via the nzteClosePersona function), then storing the * persona creates that association. The wallet will also have an * updated persona list that reflects this association. * * If the open persona was associated with wallet 'A' (it was * opened via the nztwOpenWallet function), and is stored back into * wallet 'A', then then the old persona is overwritten by the new * persona if the password can be verified. Recall that all * personas have a unique identity id. If that id changes then * storing the persona will put a new persona in the wallet. * * If the open persona was associated with wallet 'A' and is stored * into wallet 'B', and if wallet 'B' does not contain a persona * with that unique identity id, then the persona will be copied * into wallet 'B', wallet 'B''s persona list will be updated, and * the persona structure will be updated to be associated with * wallet 'B'. If wallet 'B' already contained the persona, it * would be overwritten by the new persona. * * The persona parameter is doubly indirect so that at the * conclusion of the function call, the pointer can be directed to * the persona in the wallet. * * RETURNS * NZERROR_OK Success. * NZERROR_TK_PASSWORD Password verification failed. * NZERROR_RIO_STORE Store failed (see network trace file). */#ifdef __STDC__nzerror nzteStorePersona(nzctx *, nzttPersona **, nzttWallet *);#elsenzerror nzteStorePersona(/*_ nzctx *, nzttPersona **, nzttWallet * _*/);#endif /* __STDC __*//*--------------------- nzteRemovePersona ---------------------*//* * NAME * nzteRemovePersona - Remove a persona from the wallet. * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN/OUT} Persona. * * NOTES * The password is verified before trying to remove the persona. * * If the persona is open, it is closed. The persona is removed * from the wallet list and the persona pointer is set to NULL. * * A double indirect pointer to the persona is required so that the * persona pointer can be set to NULL upon completion. * * RETURNS * NZERROR_OK Success. * NZERROR_TK_PASSWORD Password verification failed. * NZERROR_RIO_DELETE Delete failed. */#ifdef __STDC__nzerror nzteRemovePersona(nzctx *, nzttPersona **);#elsenzerror nzteRemovePersona(/*_ nzctx *, nzttPersona ** _*/);#endif /* __STDC __*//*--------------------- nzteCreatePersona ---------------------*//* * NAME * nzteCreatePersona - Create a persona. * * PARAMETERS * osscntxt {IN} OSS context. * itype {IN} Identity type. * ctype {IN} Cipher type. * desc {IN} Persona description. * persona {OUT} Persona. * * NOTES * The resulting persona is created in the open state, but it will * not be associated with a wallet. * * The memory for the persona is allocated by the function. * * RETURNS * NZERROR_OK Success. * NZERROR_TK_TYPE Unsupported itype/ctype combination. * NZERROR_TK_PARMS Error in persona description. */#ifdef __STDC__nzerror nzteCreatePersona(nzctx *, nzttVersion, nzttCipherType, nzttPersonaDesc *, nzttPersona **);#elsenzerror nzteCreatePersona(/*_ nzctx *, nzttVersion, nzttCipherType, nzttPersonaDesc *, nzttPersona ** _*/);#endif /* __STDC __*//*----------------- nztiStoreTrustedIdentity -----------------*//* * NAME * nztiStoreTrustedIdentity - Store an identity into a persona. * * PARAMETERS * osscntxt {IN} Success. * identity {IN/OUT} Trusted Identity. * persona {IN/OUT} Persona. * * NOTES * The identity is not saved with the persona in the wallet until * the persona is stored. * * The identity parameter is double indirect so that it can point * into the persona at the conclusion of the call. * * RETURNS * NZERROR_OK Success. */#ifdef __STDC__nzerror nztiStoreTrustedIdentity(nzctx *, nzttIdentity **, nzttPersona *);#elsenzerror nztiStoreTrustedIdentity(/*_ nzctx *, nzttIdentity **, nzttPersona * _*/);#endif /* __STDC __*//*--------------------- nzteSetProtection ---------------------*//* * NAME * nzteSetProtection - Set the protection type for a CE function. * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN/OUT} Persona. * func {IN} CE function. * tdufmt {IN} TDU Format. * protinfo {IN} Protection information specific to this format. * * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_PROTECTION Unsupported protection. * NZERROR_TK_PARMS Error in protection info. */#ifdef __STDC__nzerror nzteSetProtection(nzctx *, nzttPersona *, nzttcef, nztttdufmt, nzttProtInfo *);#elsenzerror nzteSetProtection(/*_ nzctx *, nzttPersona *, nzttcef, nztttdufmt, nzttProtInfo * _*/);#endif /* __STDC __*//*--------------------- nzteGetProtection ---------------------*//* * NAME * nzteGetProtection - Get the protection type for a CE function. * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Persona. * func {IN} CE function. * tdufmt {OUT} TDU format. * protinfo {OUT} Protection information. * * NOTES * * RETURNS *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -