Next: Error Handling, Previous: Utility Functions, Up: Programming Manual
handle: shishi handle as allocated by
shishi_init()
.node: ASN.1 variable to read field from.
field: name of field in
node
to read.data: pre-allocated output buffer that will hold ASN.1 field data.
datalen: on input, maximum size of output buffer, on output, actual size of output buffer.
Extract data stored in a ASN.1 field into a fixed size buffer allocated by caller.
Note that since it is difficult to predict the length of the field, it is often better to use
shishi_asn1_read()
instead.Return value: Returns SHISHI_OK if successful, SHISHI_ASN1_NO_ELEMENT if the element do not exist, SHISHI_ASN1_NO_VALUE if the field has no value, ot SHISHI_ASN1_ERROR otherwise.
handle: shishi handle as allocated by
shishi_init()
.node: ASN.1 variable to read field from.
field: name of field in
node
to read.data: newly allocated output buffer that will hold ASN.1 field data.
datalen: actual size of output buffer.
Extract data stored in a ASN.1 field into a newly allocated buffer. The buffer will always be zero terminated, even though
datalen
will not include the added zero.Return value: Returns SHISHI_OK if successful, SHISHI_ASN1_NO_ELEMENT if the element do not exist, SHISHI_ASN1_NO_VALUE if the field has no value, ot SHISHI_ASN1_ERROR otherwise.
handle: shishi handle as allocated by
shishi_init()
.node: ASN.1 variable to read field from.
field: name of field in
node
to read.data: newly allocated output buffer that will hold ASN.1 field data.
datalen: actual size of output buffer.
Extract data stored in a ASN.1 field into a newly allocated buffer. If the field does not exist (i.e., SHISHI_ASN1_NO_ELEMENT), this function set datalen to 0 and succeeds. Can be useful to read ASN.1 fields which are marked OPTIONAL in the grammar, if you want to avoid special error handling in your code.
Return value: Returns SHISHI_OK if successful, SHISHI_ASN1_NO_VALUE if the field has no value, ot SHISHI_ASN1_ERROR otherwise.
handle: shishi handle as allocated by
shishi_init()
.node: ASN.1 node to dellocate.
Deallocate resources associated with ASN.1 structure. Note that the node must not be used after this call.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for PA-ENC-TS-ENC.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for EncryptedData
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for PA-DATA.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for METHOD-DATA.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for ETYPE-INFO.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for ETYPE-INFO2.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for AS-REQ.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for AS-REP.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for TGS-REQ.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for TGS-REP.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for AP-REQ.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for AP-REP.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for AP-REP.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for Ticket.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for EncTicketPart.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for Authenticator.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for EncKDCRepPart.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for EncASRepPart.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for KRB-ERROR.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for KRB-SAFE.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for KRB-PRIV.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.Create new ASN.1 structure for EncKrbPrivPart.
Return value: Returns ASN.1 structure.
handle: shishi handle as allocated by
shishi_init()
.node: ASN.1 data that have field to extract.
field: name of field in
node
to extract.der: output array that holds DER encoding of
field
innode
.len: output variable with length of
der
output array.Extract newly allocated DER representation of specified ASN.1 field.
Return value: Returns SHISHI_OK if successful, or SHISHI_ASN1_ERROR if DER encoding fails (common reasons for this is that the ASN.1 is missing required values).
handle: shishi handle as allocated by
shishi_init()
.node: ASN.1 data to convert to DER.
der: output array that holds DER encoding of
node
.len: output variable with length of
der
output array.Extract newly allocated DER representation of specified ASN.1 data.
Return value: Returns SHISHI_OK if successful, or SHISHI_ASN1_ERROR if DER encoding fails (common reasons for this is that the ASN.1 is missing required values).
handle: shishi handle as allocated by
shishi_init()
.node: ASN.1 type to get msg type for.
Determine msg-type of ASN.1 type of a packet. Currently this uses the msg-type field instead of the APPLICATION tag, but this may be changed in the future.
Return value: Returns msg-type of ASN.1 type, 0 on failure.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Determine msg-type of DER coded data of a packet.
Return value: Returns msg-type of DER data, 0 on failure.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Convert arbitrary DER data of a packet to a ASN.1 type.
Return value: Returns newly allocate ASN.1 corresponding to DER data, or
NULL
on failure.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of PA-DATA and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of METHOD-DATA and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of ETYPE-INFO and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of ETYPE-INFO2 and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of Ticket and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of EncTicketPart and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of AS-REQ and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of TGS-REQ and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of AS-REP and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of TGS-REP and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of KDC-REP and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of EncASRepPart and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of EncTGSRepPart and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of EncKDCRepPart and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of Authenticator and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of KRB-ERROR and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of KRB-SAFE and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of KRB-PRIV and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of EncKrbPrivPart and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of AP-REQ and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of AP-REP and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of EncAPRepPart and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.
handle: shishi handle as allocated by
shishi_init()
.der: input character array with DER encoding.
derlen: length of input character array with DER encoding.
Decode DER encoding of AS-REQ, TGS-REQ or KDC-REQ and create a ASN.1 structure.
Return value: Returns ASN.1 structure corresponding to DER data.