📄 nzt.h
字号:
* RETURNS * NZERROR_OK Success. */#ifdef __STDC__nzerror nzteRetrieveTrustedIdentCopy(nzctx *, nzttPersona *, ub4, nzttIdentity **);#elsenzerror nzteRetrieveTrustedIdentCopy(/*_ nzctx *, nzttPersona *, ub4, nzttIdentity ** _*/);#endif /* __STDC __*//*--------------------- nztePriKey ---------------------*//* * NAME * nztePriKey - Get the decrypted Private Key for the Persona * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Persona. * vkey {OUT} Private Key [B_KEY_OBJ] * vkey_len {OUT} Private Key Length * * NOTES * This funiction will only work for X.509 based persona which contain * a private key. * A copy of the private key is returned to the caller so that they do not * have to worry about the key changeing "underneath them". * Memory will be allocated for the vkey and therefore, the CALLER * will be responsible for freeing this memory. * * RETURNS * NZERROR_OK Success. * NZERROR_NO_MEMORY ossctx is null. * NZERROR_TK_BADPRL Persona resource locator did not work. */#ifdef __STDC__nzerror nztePriKey(nzctx *, nzttPersona *, ub1 **, ub4 *);#elsenzerror nztePriKey(/*_ nzctx *, nzttPersona *, ub1 **, ub4 * _*/);#endif /* __STDC __*//*--------------------- nzteMyCert ---------------------*//* * NAME * nzteMyCert - Get the X.509 Certificate for a persona * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Persona. * cert {OUT} X.509 Certificate [BER encoded] * cert_len {OUT} Certificate length * * NOTES * This funiction will only work for X.509 based persona which contain * a certificate for the self identity. * A copy of the certificate is returned to the caller so that they do not * have to worry about the certificate changeing "underneath them". * Memory will be allocated for the cert and therefore, the CALLER * will be responsible for freeing this memory. * * RETURNS * NZERROR_OK Success. * NZERROR_NO_MEMORY ossctx is null. */#ifdef __STDC__nzerror nzteMyCert(nzctx *, nzttPersona *, ub1 **, ub4 *);#elsenzerror nzteMyCert(/*_ nzctx *, nzttPersona *, ub1 **, ub4 * _*/);#endif /* __STDC __*//*--------------------- nzteX509CreatePersona ---------------------*//* * NAME * nzteX509CreatePersona - Given a BER X.509 cert, create a persona * * PARAMETERS * osscntxt {IN} OSS context. * cert {IN} X.509 Certificate [BER encoded] * cert_len {IN} Certificate length * persona {OUT} Persona. * * NOTES * Memory will be allocated for the persona and therefore, the CALLER * will be responsible for freeing this memory. * * RETURNS * NZERROR_OK Success. * NZERROR_NO_MEMORY ossctx is null. */#ifdef __STDC__nzerror nzteX509CreatePersona(nzctx *, ub1 *, ub4, nzttPersona **);#elsenzerror nzteX509CreatePersona(/*_ nzctx *, ub1 *, ub4, nzttPersona ** _*/);#endif /* __STDC __*//*-------------------- nztiCreateIdentity --------------------*//* * NAME * nztiCreateIdentity - Create an identity. * * PARAMETERS * osscntxt {IN} OSS context. * itype {IN} Identity type. * desc {IN} Description of identity. * identity {IN/OUT} Identity. * * NOTES * Memory is only allocated for the identity structure. The elements in * the description struct are not copied. Rather their pointers are copied * into the identity structure. Therefore, the caller should not free * the elements referenced by the desc. These elements will be freed * when the nztiDestroyIdentity is called. * * RETURNS * NZERROR_OK Success. * NZERROR_PARMS Error in description. */#ifdef __STDC__nzerror nztiCreateIdentity(nzctx *, nzttVersion, nzttIdentityDesc *, nzttIdentity **);#elsenzerror nztiCreateIdentity(/*_ nzctx *, nzttVersion, nzttIdentityDesc *, nzttIdentity ** _*/);#endif /* __STDC __*/#ifdef NZ_OLD_TOOLS/*-------------------- nztiDuplicateIdentity --------------------*//* * NAME * nztiDuplicateIdentity - Duplicate an identity. * * PARAMETERS * osscntxt {IN} OSS context. * identity {IN} Target Identity. * new_identity {IN} New Identity. * * NOTES * Memory for the identity is allocated inside the function, and all * internal identity elements as well. * * RETURNS * NZERROR_OK Success. * NZERROR_TK_NOTFOUND Identity not found. * NZERROR_PARMS Error in description. */#ifdef __STDC__nzerror nztiDuplicateIdentity(nzctx *, nzttIdentity *, nzttIdentity **);#elsenzerror nztiDuplicateIdentity(/*_ nzctx *, nzttIdentity *, nzttIdentity ** _*/);#endif /* __STDC __*/#endif /* NZ_OLD_TOOLS *//*--------------------- nztiAbortIdentity ---------------------*//* * NAME * nztiAbortIdentity - Abort an unassociated identity. * * PARAMETERS * osscntxt {IN} OSS context. * identity {IN/OUT} Identity. * * NOTES * It is an error to try to abort an identity that can be * referenced through a persona. * * The identity pointer is set to NULL at the conclusion. * * RETURNS * NZERROR_OK Success. * NZERROR_CANTABORT Identity is associated with persona. */#ifdef __STDC__nzerror nztiAbortIdentity(nzctx *, nzttIdentity **);#elsenzerror nztiAbortIdentity(/*_ nzctx *, nzttIdentity ** _*/);#endif /* __STDC __*/#ifdef NZ_OLD_TOOLS/*----------------- nztidGetIdentityDesc -----------------*//* * NAME * nztidGetIdentityDesc - Gets an Identity Description from the identity * * PARAMETERS * osscntxt {IN} Success. * identity {IN} Identity. * description {IN/OUT} Identity Description. * * NOTES * Memory is allocated for the Identity Description. It * is the callers responsibility to free this memory by calling * nztiFreeIdentityDesc. * * RETURNS * NZERROR_OK Success. */#ifdef __STDC__nzerror nztidGetIdentityDesc(nzctx *, nzttIdentity *, nzttIdentityDesc **);#elsenzerror nztidGetIdentityDesc(/*_ nzctx *, nzttIdentity *, nzttIdentityDesc ** _*/);#endif /* __STDC __*//*----------------- nztidFreeIdentityDesc -----------------*//* * NAME * nztidFreeIdentityDesc - Frees memory for Identity Desc object. * * PARAMETERS * osscntxt {IN} oss context. * description {IN/OUT} Identity Description. * * NOTES * Memory is freed for all Identity description elements. Pointer is * then set to null. * * RETURNS * NZERROR_OK Success. */#ifdef __STDC__nzerror nztidFreeIdentityDesc(nzctx *, nzttIdentityDesc **);#elsenzerror nztidFreeIdentityDesc(/*_ nzctx *, nzttIdentityDesc ** _*/);#endif /* __STDC __*/#endif /* NZ_OLD_TOOLS *//*---------------- nztific_FreeIdentityContent ----------------*//* * NAME * nztific_FreeIdentityContent - free the contents of an identity. * * PARAMETERS * osscntxt {IN} OSS context. * identity {IN/OUT} freed identity * * NOTES * Free a created identity. * * RETURNS * NZERROR_OK Success. *//* * Free the identity content. */#ifdef __STDC__nzerror nztific_FreeIdentityContent(nzctx *ossctx, nzttIdentity *identity);#elsenzerror nztific_FreeIdentityContent(/*_ nzctx *ossctx, nzttIdentity *identity _*/);#endif /* __STDC __*//*-------------------------- nztSign --------------------------*//* * NAME * nztSign - Create an attached signature. * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Open persona acting as signer. * state {IN} State of signature. * inlen {IN} Length of this input part. * in {IN} This input part. * tdubuf {IN/OUT} TDU buffer. * * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_CANTGROW Needed to grow output buffer but could not. * NZERROR_TK_NOTOPEN Persona is not open. * NZERROR_TK_NOTSUPP Function not supported with persona. */#ifdef __STDC__nzerror nztSign(nzctx *, nzttPersona *, nzttces, ub4, ub1 *, nzttBufferBlock *);#elsenzerror nztSign(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *, nzttBufferBlock * _*/);#endif /* __STDC __*//*------------------------- nztVerify -------------------------*//* * NAME * nztVerify - Verify an attached signature. * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Persona. * state {IN} State of verification. * intdulen {IN} TDU length. * intdu {IN} TDU. * out {IN/OUT} Extracted message. * verified {OUT} TRUE if signature verified. * validated{OUT} TRUE if signing identity validated. * identity {OUT} Identity of signing party. * * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_CANTGROW Needed to grow outptu buffer but could not. * NZERROR_TK_NOTOPEN Persona is not open. * NZERROR_TK_NOTSUPP Function not supported with persona. */#ifdef __STDC__nzerror nztVerify(nzctx *, nzttPersona *, nzttces, ub4, ub1 *, nzttBufferBlock *, boolean *, boolean *, nzttIdentity **);#elsenzerror nztVerify(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *, nzttBufferBlock *, boolean *, boolean *, nzttIdentity ** _*/);#endif /* __STDC __*//*------------------------ nztValidate ------------------------*//* * NAME * nztValidate - Validate an identity. * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Persona. * identity {IN} Identity. * validated{OUT} TRUE if identity was validated. * * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_NOTOPEN Persona is not open. * NZERROR_TK_NOTSUPP Function not supported with persona. */#ifdef __STDC__nzerror nztValidate(nzctx *, nzttPersona *, nzttIdentity *, boolean *);#elsenzerror nztValidate(/*_ nzctx *, nzttPersona *, nzttIdentity *, boolean * _*/);#endif /* __STDC __*//*-------------------- nztsd_SignDetached --------------------*//* * NAME * nztsd_SignDetached - Generate a detached signature. * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Persona. * state {IN} State of signature. * inlen {IN} Length of this input part. * in {IN} This input part. * tdubuf {IN/OUT} TDU buffer. * * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_CANTGROW Needed to grow output buffer but could not. * NZERROR_TK_NOTOPEN Persona is not open. * NZERROR_TK_NOTSUPP Function not supported with persona. */#ifdef __STDC__nzerror nztsd_SignDetached(nzctx *, nzttPersona *, nzttces, ub4, ub1 *, nzttBufferBlock *);#elsenzerror nztsd_SignDetached(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *, nzttBufferBlock * _*/);#endif /* __STDC __*//*------------------- nztved_VerifyDetached -------------------*//* * NAME * nztved_VerifyDetached - Verify a detached signature. * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Persona. * state {IN} State of verification. * inlen {IN} Length of data. * in {IN} Data. * intdulen {IN} Input TDU length. * tdu {IN} Input TDU. * verified {OUT} TRUE if signature verified. * validated{OUT} TRUE if signing identity validated. * identity {OUT} Identity of signing party. * * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_NOTOPEN Persona is not open. * NZERROR_TK_NOTSUPP Function not supported with persona. */#ifdef __STDC__nzerror nztved_VerifyDetached(nzctx *, nzttPersona *, nzttces, ub4, ub1 *, ub4, ub1 *, boolean *, boolean *, nzttIdentity **);#elsenzerror nztved_VerifyDetached(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *, ub4, ub1 *, boolean *, boolean *, nzttIdentity ** _*/);#endif /* __STDC __*//*--------------------- nztkec_PKEncrypt ---------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -