Guardtime KSI c SDK
Typedefs | Enumerations | Functions
Hashchain Computation

Typedefs

typedef enum KSI_HashChainLinkIdentityType_en KSI_HashChainLinkIdentityType
 

Enumerations

enum  KSI_HashChainLinkIdentityType_en { KSI_IDENTITY_TYPE_LEGACY_ID, KSI_IDENTITY_TYPE_METADATA, KSI_IDENTITY_TYPE_UNKNOWN }
 

Functions

int KSI_HashChain_aggregate (KSI_CTX *, KSI_LIST(KSI_HashChainLink)*chain, const KSI_DataHash *inputHash, int startLevel, KSI_HashAlgorithm algo_id, int *endLevel, KSI_DataHash **outputHash)
 
int KSI_HashChain_aggregateCalendar (KSI_CTX *, KSI_LIST(KSI_HashChainLink)*chain, const KSI_DataHash *inputHash, KSI_DataHash **outputHash)
 
void KSI_HashChainLink_free (KSI_HashChainLink *t)
 
int KSI_HashChainLink_new (KSI_CTX *ctx, KSI_HashChainLink **t)
 
int KSI_HashChainLink_getIsLeft (const KSI_HashChainLink *t, int *isLeft)
 
int KSI_HashChainLink_getLevelCorrection (const KSI_HashChainLink *t, KSI_Integer **levelCorrection)
 
int KSI_HashChainLink_getLegacyId (const KSI_HashChainLink *t, KSI_OctetString **legacyId)
 
int KSI_HashChainLink_getMetaData (const KSI_HashChainLink *t, KSI_MetaDataElement **metaData)
 
int KSI_HashChainLink_getImprint (const KSI_HashChainLink *t, KSI_DataHash **imprint)
 
int KSI_HashChainLink_setIsLeft (KSI_HashChainLink *t, int isLeft)
 
int KSI_HashChainLink_setLevelCorrection (KSI_HashChainLink *t, KSI_Integer *levelCorrection)
 
int KSI_HashChainLink_setLegacyId (KSI_HashChainLink *t, KSI_OctetString *legacyId)
 
int KSI_HashChainLink_setMetaData (KSI_HashChainLink *t, KSI_MetaDataElement *metaData)
 
int KSI_HashChainLink_setImprint (KSI_HashChainLink *t, KSI_DataHash *imprint)
 
int KSI_HashChainLink_fromTlv (KSI_TLV *tlv, KSI_HashChainLink **o)
 
int KSI_HashChainLink_toTlv (KSI_CTX *ctx, const KSI_HashChainLink *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
 
int KSI_HashChainLink_LegacyId_fromTlv (KSI_TLV *tlv, KSI_OctetString **legacyId)
 
int KSI_HashChainLink_LegacyId_toTlv (KSI_CTX *ctx, const KSI_OctetString *legacyId, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
 
int KSI_CalendarHashChainLink_fromTlv (KSI_TLV *tlv, KSI_CalendarHashChainLink **o)
 
int KSI_CalendarHashChainLink_toTlv (KSI_CTX *ctx, const KSI_CalendarHashChainLink *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
 
void KSI_CalendarHashChain_free (KSI_CalendarHashChain *t)
 
int KSI_CalendarHashChain_new (KSI_CTX *ctx, KSI_CalendarHashChain **t)
 
int KSI_CalendarHashChain_aggregate (KSI_CalendarHashChain *chain, KSI_DataHash **hsh)
 
int KSI_CalendarHashChain_calculateAggregationTime (const KSI_CalendarHashChain *chain, time_t *aggrTime)
 
int KSI_CalendarHashChain_getPublicationTime (const KSI_CalendarHashChain *t, KSI_Integer **publicationTime)
 
int KSI_CalendarHashChain_getAggregationTime (const KSI_CalendarHashChain *t, KSI_Integer **aggregationTime)
 
int KSI_CalendarHashChain_getInputHash (const KSI_CalendarHashChain *t, KSI_DataHash **inputHash)
 
int KSI_CalendarHashChain_getHashChain (const KSI_CalendarHashChain *t, KSI_LIST(KSI_HashChainLink)**hashChain)
 
int KSI_CalendarHashChain_setPublicationTime (KSI_CalendarHashChain *t, KSI_Integer *publicationTime)
 
int KSI_CalendarHashChain_setAggregationTime (KSI_CalendarHashChain *t, KSI_Integer *aggregationTime)
 
int KSI_CalendarHashChain_setInputHash (KSI_CalendarHashChain *t, KSI_DataHash *inputHash)
 
int KSI_CalendarHashChain_setHashChain (KSI_CalendarHashChain *t, KSI_LIST(KSI_HashChainLink)*hashChain)
 
int KSI_CalendarHashChain_verifyCompatibilityTo (const KSI_CalendarHashChain *a, const KSI_CalendarHashChain *b)
 
KSI_CalendarHashChainKSI_CalendarHashChain_ref (KSI_CalendarHashChain *o)
 
int KSI_CalendarHashChain_writeBytes (KSI_CalendarHashChain *o, unsigned char *buf, size_t buf_size, size_t *buf_len, int opt)
 
void KSI_HashChainLinkIdentity_free (KSI_HashChainLinkIdentity *identity)
 
int KSI_HashChainLinkIdentity_getType (const KSI_HashChainLinkIdentity *o, KSI_HashChainLinkIdentityType *v)
 
int KSI_HashChainLinkIdentity_getClientId (const KSI_HashChainLinkIdentity *o, KSI_Utf8String **v)
 
int KSI_HashChainLinkIdentity_getMachineId (const KSI_HashChainLinkIdentity *o, KSI_Utf8String **v)
 
int KSI_HashChainLinkIdentity_getSequenceNr (const KSI_HashChainLinkIdentity *o, KSI_Integer **v)
 
int KSI_HashChainLinkIdentity_getRequestTime (const KSI_HashChainLinkIdentity *o, KSI_Integer **v)
 
KSI_HashChainLinkIdentityKSI_HashChainLinkIdentity_ref (KSI_HashChainLinkIdentity *o)
 
int KSI_AggregationHashChain_getIdentity (const KSI_AggregationHashChain *aggr, KSI_HashChainLinkIdentityList **identity)
 
void KSI_AggregationHashChain_free (KSI_AggregationHashChain *aggr)
 
int KSI_AggregationHashChain_new (KSI_CTX *ctx, KSI_AggregationHashChain **out)
 
int KSI_Signature_appendAggregationChain (KSI_Signature *sig, KSI_AggregationHashChain *aggr)
 
int KSI_AggregationHashChain_aggregate (KSI_AggregationHashChain *aggr, int startLevel, int *endLevel, KSI_DataHash **root)
 
int KSI_AggregationHashChain_calculateShape (const KSI_AggregationHashChain *chn, KSI_uint64_t *shape)
 
int KSI_AggregationHashChain_compare (const KSI_AggregationHashChain **left, const KSI_AggregationHashChain **right)
 
int KSI_AggregationHashChain_getAggregationTime (const KSI_AggregationHashChain *aggr, KSI_Integer **aggregationTime)
 
int KSI_AggregationHashChain_getChainIndex (const KSI_AggregationHashChain *aggr, KSI_LIST(KSI_Integer)**chainIndex)
 
int KSI_AggregationHashChain_getInputData (const KSI_AggregationHashChain *aggr, KSI_OctetString **inputData)
 
int KSI_AggregationHashChain_getInputHash (const KSI_AggregationHashChain *aggr, KSI_DataHash **inputHash)
 
int KSI_AggregationHashChain_getAggrHashId (const KSI_AggregationHashChain *aggr, KSI_Integer **aggrHashId)
 
int KSI_AggregationHashChain_getChain (const KSI_AggregationHashChain *aggr, KSI_LIST(KSI_HashChainLink)**chain)
 
int KSI_AggregationHashChain_setAggregationTime (KSI_AggregationHashChain *aggr, KSI_Integer *aggregationTime)
 
int KSI_AggregationHashChain_setChainIndex (KSI_AggregationHashChain *aggr, KSI_LIST(KSI_Integer)*chainIndex)
 
int KSI_AggregationHashChain_setInputData (KSI_AggregationHashChain *aggr, KSI_OctetString *inputData)
 
int KSI_AggregationHashChain_setInputHash (KSI_AggregationHashChain *aggr, KSI_DataHash *inputHash)
 
int KSI_AggregationHashChain_setAggrHashId (KSI_AggregationHashChain *aggr, KSI_Integer *aggrHashId)
 
int KSI_AggregationHashChain_setChain (KSI_AggregationHashChain *aggr, KSI_LIST(KSI_HashChainLink)*chain)
 
KSI_AggregationHashChainKSI_AggregationHashChain_ref (KSI_AggregationHashChain *o)
 
int KSI_AggregationHashChain_writeBytes (KSI_AggregationHashChain *o, unsigned char *buf, size_t buf_size, size_t *buf_len, int opt)
 
int KSI_AggregationHashChainList_aggregate (KSI_AggregationHashChainList *chainList, KSI_CTX *ctx, int level, KSI_DataHash **outputHash)
 

Detailed Description

This module contains hash chain computation methods. General hash chains are represented as a list of KSI_HashChainLink objects, where the first element is also the first sibling.

Typedef Documentation

Hash chain link identity type.

Enumeration Type Documentation

Hash chain link identity type.

Enumerator
KSI_IDENTITY_TYPE_LEGACY_ID 

Legacy client identifier. A client identifier converted from a legacy signature.

KSI_IDENTITY_TYPE_METADATA 

Metadata. A structure that provides the ability to incorporate client identity and other information about the request into the hash chain.

KSI_IDENTITY_TYPE_UNKNOWN 

Function Documentation

int KSI_AggregationHashChain_aggregate ( KSI_AggregationHashChain aggr,
int  startLevel,
int *  endLevel,
KSI_DataHash **  root 
)

Aggregate the aggregation chain.

Parameters
[in]aggrThe aggregation chain.
[in]startLevelThe level of the first chain link.
[out]endLevelThe level of the root node. Can be NULL.
[out]rootPointer to the receiving pointer. Can be NULL.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_AggregationHashChain_calculateShape ( const KSI_AggregationHashChain chn,
KSI_uint64_t shape 
)

This function will represent the shape of the aggregation chain. The bits represent the path from the root of the tree to the location of a hash value as a sequence of moves from a parent node in the tree to either the left or right child (bit values 0 and 1, respectively). Each bit sequence starts with a 1-bit to make sure no left most 0-bits are lost.

Parameters
[in]chnThe aggregation chain.
[out]shapePointer to the receiving variable.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_AggregationHashChain_compare ( const KSI_AggregationHashChain **  left,
const KSI_AggregationHashChain **  right 
)
void KSI_AggregationHashChain_free ( KSI_AggregationHashChain aggr)

Cleanup method for the aggregation hash chain.

Parameters
[in]aggrAggregation hash chain.
int KSI_AggregationHashChain_getAggregationTime ( const KSI_AggregationHashChain aggr,
KSI_Integer **  aggregationTime 
)
int KSI_AggregationHashChain_getAggrHashId ( const KSI_AggregationHashChain aggr,
KSI_Integer **  aggrHashId 
)
int KSI_AggregationHashChain_getChain ( const KSI_AggregationHashChain aggr,
KSI_LIST(KSI_HashChainLink)**  chain 
)
int KSI_AggregationHashChain_getChainIndex ( const KSI_AggregationHashChain aggr,
KSI_LIST(KSI_Integer)**  chainIndex 
)
int KSI_AggregationHashChain_getIdentity ( const KSI_AggregationHashChain aggr,
KSI_HashChainLinkIdentityList **  identity 
)

Get aggregation hash chain identity. The returned list consists of individual hash chain link identities. The identities in the list are ordered - the higher-link identity is before lower-link identity.

Parameters
[in]aggrAggregation hash chain.
[in]identityPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_AggregationHashChain_getInputData ( const KSI_AggregationHashChain aggr,
KSI_OctetString **  inputData 
)
int KSI_AggregationHashChain_getInputHash ( const KSI_AggregationHashChain aggr,
KSI_DataHash **  inputHash 
)
int KSI_AggregationHashChain_new ( KSI_CTX ctx,
KSI_AggregationHashChain **  out 
)

Aggregation hash chain constructor.

Parameters
[in]ctxKSI context.
[out]outPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
KSI_AggregationHashChain* KSI_AggregationHashChain_ref ( KSI_AggregationHashChain o)
int KSI_AggregationHashChain_setAggregationTime ( KSI_AggregationHashChain aggr,
KSI_Integer aggregationTime 
)
int KSI_AggregationHashChain_setAggrHashId ( KSI_AggregationHashChain aggr,
KSI_Integer aggrHashId 
)
int KSI_AggregationHashChain_setChain ( KSI_AggregationHashChain aggr,
KSI_LIST(KSI_HashChainLink)*  chain 
)
int KSI_AggregationHashChain_setChainIndex ( KSI_AggregationHashChain aggr,
KSI_LIST(KSI_Integer)*  chainIndex 
)
int KSI_AggregationHashChain_setInputData ( KSI_AggregationHashChain aggr,
KSI_OctetString inputData 
)
int KSI_AggregationHashChain_setInputHash ( KSI_AggregationHashChain aggr,
KSI_DataHash inputHash 
)
int KSI_AggregationHashChain_writeBytes ( KSI_AggregationHashChain o,
unsigned char *  buf,
size_t  buf_size,
size_t *  buf_len,
int  opt 
)
  • This function serializes the # KSI_AggregationHashChain object and writes the result into a pre-allocated buffer. *
    Parameters
    [in]oObject to be serialized. *
    [in]bufPointer to pre-allocated buffer. *
    [in]buf_sizeBuffer size. *
    [out]buf_lenSerialized buffer length. *
    [in]optSerialization options. *
    Returns
    status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_AggregationHashChainList_aggregate ( KSI_AggregationHashChainList chainList,
KSI_CTX ctx,
int  level,
KSI_DataHash **  outputHash 
)

This function aggregates the aggregation hash chain list and returns the result hash via outputHash parameter.

Parameters
[in]chainListHash chain list (list of hash chains).
[in]ctxKSI context.
[in]levelAggregation level.
[out]outputHashPointer to the receiving pointer to data hash object.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The output memory buffer belongs to the caller and needs to be freed by the caller using KSI_free.
int KSI_CalendarHashChain_aggregate ( KSI_CalendarHashChain chain,
KSI_DataHash **  hsh 
)
int KSI_CalendarHashChain_calculateAggregationTime ( const KSI_CalendarHashChain chain,
time_t *  aggrTime 
)
void KSI_CalendarHashChain_free ( KSI_CalendarHashChain t)

KSI_CalendarHashChain

int KSI_CalendarHashChain_getAggregationTime ( const KSI_CalendarHashChain t,
KSI_Integer **  aggregationTime 
)
int KSI_CalendarHashChain_getHashChain ( const KSI_CalendarHashChain t,
KSI_LIST(KSI_HashChainLink)**  hashChain 
)
int KSI_CalendarHashChain_getInputHash ( const KSI_CalendarHashChain t,
KSI_DataHash **  inputHash 
)
int KSI_CalendarHashChain_getPublicationTime ( const KSI_CalendarHashChain t,
KSI_Integer **  publicationTime 
)
int KSI_CalendarHashChain_new ( KSI_CTX ctx,
KSI_CalendarHashChain **  t 
)
KSI_CalendarHashChain* KSI_CalendarHashChain_ref ( KSI_CalendarHashChain o)
int KSI_CalendarHashChain_setAggregationTime ( KSI_CalendarHashChain t,
KSI_Integer aggregationTime 
)
int KSI_CalendarHashChain_setHashChain ( KSI_CalendarHashChain t,
KSI_LIST(KSI_HashChainLink)*  hashChain 
)
int KSI_CalendarHashChain_setInputHash ( KSI_CalendarHashChain t,
KSI_DataHash inputHash 
)
int KSI_CalendarHashChain_setPublicationTime ( KSI_CalendarHashChain t,
KSI_Integer publicationTime 
)
int KSI_CalendarHashChain_verifyCompatibilityTo ( const KSI_CalendarHashChain a,
const KSI_CalendarHashChain b 
)

Checks if the two calendar hash chains are compatible with each other. The function performs the following checks:

  1. Neither of the inputs is NULL. This limits false positives due to coding errors.
  2. The input hashes match.
  3. The aggregation times match. Note, the publication times must not match.
  4. The right links from both calendar hash chains are pairwise equal.
Parameters
[in]aThe first calendar hash chain.
[in]bThe second calendar hash chain.
Returns
Returns KSI_OK on success; KSI_INCOMPATIBLE_HASH_CHAIN if the calendar hash chains are incompatible or an error otherwise.
Note
If at least one of the arguments is NULL, the result is considered to be incompatible.
The publication time from the two aggregation hash chains and also the left-links from both of the chains can differ.
int KSI_CalendarHashChain_writeBytes ( KSI_CalendarHashChain o,
unsigned char *  buf,
size_t  buf_size,
size_t *  buf_len,
int  opt 
)
  • This function serializes the # KSI_CalendarHashChain object and writes the result into a pre-allocated buffer. *
    Parameters
    [in]oObject to be serialized. *
    [in]bufPointer to pre-allocated buffer. *
    [in]buf_sizeBuffer size. *
    [out]buf_lenSerialized buffer length. *
    [in]optSerialization options. *
    Returns
    status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_CalendarHashChainLink_fromTlv ( KSI_TLV tlv,
KSI_CalendarHashChainLink **  o 
)

Function to convert a plain KSI_TLV to a KSI_CalendarHashChainLink . The TLV meta data (i.e. tag, length and flags) are not preserved.

Parameters
[in]tlvPointer to KSI_TLV.
[out]oPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_CalendarHashChainLink_fromTlv
int KSI_CalendarHashChainLink_toTlv ( KSI_CTX ctx,
const KSI_CalendarHashChainLink o,
unsigned  tag,
int  isNonCritical,
int  isForward,
KSI_TLV **  tlv 
)

Function to convert a KSI_CalendarHashChainLink to a plain KSI_TLV object.

Parameters
[in]ctxKSI context.
[in]oPointer to KSI_CalendarHashChainLink
[in]tagTag value of the KSI_TLV
[in]isNonCriticalFlag is-non-critical.
[in]isForwardFlag is-forward.
[out]tlvPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_CalendarHashChainLink_fromTlv, KSI_TLV_free
int KSI_HashChain_aggregate ( KSI_CTX ,
KSI_LIST(KSI_HashChainLink)*  chain,
const KSI_DataHash inputHash,
int  startLevel,
KSI_HashAlgorithm  algo_id,
int *  endLevel,
KSI_DataHash **  outputHash 
)

This function aggregates the hashchain and returns the result hash via outputHash parameter.

Parameters
[in]chainHash chain (list of hash chain links)
[in]inputHashInput hash value.
[in]startLevelThe initial level of this hash chain.
[in]algo_idHash algorithm to be used to calculate the next value.
[out]endLevelPointer to the receiving end level variable.
[out]outputHashPointer to the receiving pointer to data hash object.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HashChain_aggregateCalendar ( KSI_CTX ,
KSI_LIST(KSI_HashChainLink)*  chain,
const KSI_DataHash inputHash,
KSI_DataHash **  outputHash 
)

This function aggregates the calendar hash chain and returns the result hash via outputHash parameter.

Parameters
[in]chainHash chain.
[in]inputHashInput hash value.
[out]outputHashPointer to the receiving pointer to data hash object.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
void KSI_HashChainLink_free ( KSI_HashChainLink t)

Free the resources of a KSI_HashChainLink

Parameters
[in]tPointer to KSI_HashChainLink
int KSI_HashChainLink_fromTlv ( KSI_TLV tlv,
KSI_HashChainLink **  o 
)

Function to convert a plain KSI_TLV to a KSI_HashChainLink . The TLV meta data (i.e. tag, length and flags) are not preserved.

Parameters
[in]tlvPointer to KSI_TLV.
[out]oPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_HashChainLink_fromTlv
int KSI_HashChainLink_getImprint ( const KSI_HashChainLink t,
KSI_DataHash **  imprint 
)

Getter method for imprint.

Parameters
[in]tPointer to KSI_HashChainLink.
[out]imprintPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The output object still belongs to t.
int KSI_HashChainLink_getIsLeft ( const KSI_HashChainLink t,
int *  isLeft 
)

Getter method for isLeft.

Parameters
[in]tPointer to KSI_HashChainLink.
[out]isLeftPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HashChainLink_getLegacyId ( const KSI_HashChainLink t,
KSI_OctetString **  legacyId 
)

Getter method for legacyId.

Parameters
[in]tPointer to KSI_HashChainLink.
[out]legacyIdPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The output object still belongs to t.
int KSI_HashChainLink_getLevelCorrection ( const KSI_HashChainLink t,
KSI_Integer **  levelCorrection 
)

Getter method for levelCorrection.

Parameters
[in]tPointer to KSI_HashChainLink.
[out]levelCorrectionPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The output object still belongs to t.
int KSI_HashChainLink_getMetaData ( const KSI_HashChainLink t,
KSI_MetaDataElement **  metaData 
)

Getter method for metaData.

Parameters
[in]tPointer to KSI_HashChainLink.
[out]metaDataPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The output object still belongs to t.
int KSI_HashChainLink_LegacyId_fromTlv ( KSI_TLV tlv,
KSI_OctetString **  legacyId 
)
int KSI_HashChainLink_LegacyId_toTlv ( KSI_CTX ctx,
const KSI_OctetString legacyId,
unsigned  tag,
int  isNonCritical,
int  isForward,
KSI_TLV **  tlv 
)
int KSI_HashChainLink_new ( KSI_CTX ctx,
KSI_HashChainLink **  t 
)

Creates a new empty KSI_HashChainLink.

Parameters
[in]ctxKSI context.
[out]tPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_HashChainLink_free
int KSI_HashChainLink_setImprint ( KSI_HashChainLink t,
KSI_DataHash imprint 
)

Setter method for imprint.

Parameters
[in]tPointer to KSI_HashChainLink.
[in]imprintPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After calling the setter, the the object belongs to t and will be freed by KSI_HashChainLink_free.
int KSI_HashChainLink_setIsLeft ( KSI_HashChainLink t,
int  isLeft 
)

Setter method for isLeft.

Parameters
[in]tPointer to KSI_HashChainLink.
[in]isLeftPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_HashChainLink_setLegacyId ( KSI_HashChainLink t,
KSI_OctetString legacyId 
)

Setter method for legacyId.

Parameters
[in]tPointer to KSI_HashChainLink.
[in]legacyIdPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After calling the setter, the the object belongs to t and will be freed by KSI_HashChainLink_free.
int KSI_HashChainLink_setLevelCorrection ( KSI_HashChainLink t,
KSI_Integer levelCorrection 
)

Setter method for levelCorrection.

Parameters
[in]tPointer to KSI_HashChainLink.
[in]levelCorrectionPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After calling the setter, the the object belongs to t and will be freed by KSI_HashChainLink_free.
int KSI_HashChainLink_setMetaData ( KSI_HashChainLink t,
KSI_MetaDataElement metaData 
)

Setter method for metaData.

Parameters
[in]tPointer to KSI_HashChainLink.
[in]metaDataPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After calling the setter, the the object belongs to t and will be freed by KSI_HashChainLink_free.
int KSI_HashChainLink_toTlv ( KSI_CTX ctx,
const KSI_HashChainLink o,
unsigned  tag,
int  isNonCritical,
int  isForward,
KSI_TLV **  tlv 
)

Function to convert a KSI_HashChainLink to a plain KSI_TLV object.

Parameters
[in]ctxKSI context.
[in]oPointer to KSI_HashChainLink
[in]tagTag value of the KSI_TLV
[in]isNonCriticalFlag is-non-critical.
[in]isForwardFlag is-forward.
[out]tlvPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_HashChainLink_fromTlv, KSI_TLV_free
void KSI_HashChainLinkIdentity_free ( KSI_HashChainLinkIdentity identity)
int KSI_HashChainLinkIdentity_getClientId ( const KSI_HashChainLinkIdentity o,
KSI_Utf8String **  v 
)
int KSI_HashChainLinkIdentity_getMachineId ( const KSI_HashChainLinkIdentity o,
KSI_Utf8String **  v 
)
int KSI_HashChainLinkIdentity_getRequestTime ( const KSI_HashChainLinkIdentity o,
KSI_Integer **  v 
)
int KSI_HashChainLinkIdentity_getSequenceNr ( const KSI_HashChainLinkIdentity o,
KSI_Integer **  v 
)
int KSI_HashChainLinkIdentity_getType ( const KSI_HashChainLinkIdentity o,
KSI_HashChainLinkIdentityType v 
)
KSI_HashChainLinkIdentity* KSI_HashChainLinkIdentity_ref ( KSI_HashChainLinkIdentity o)
int KSI_Signature_appendAggregationChain ( KSI_Signature sig,
KSI_AggregationHashChain aggr 
)