This method retrieves the standard parts of a DSA (DSS) private key.
If the error 'eTooSmall' is returned then one of the buffers is too small to hold part of the DSA key. In this case all the length parameters (e.g., pP->length) are assigned the required length. In this way only one call is needed to this method to determine the size of all the required buffers (e.g., pP, pQ, pG, pX). To be able to use the DSA private key its associated DSA parameters must also be available.
- Parameters
-
pP | [ INOUT ] One of the DSA parameters. If pP->pString is NULL, then all the buffer required lengths will be returned. pP->length is the address of a P6UINT32 containing the size in bytes of pP->pString. On success the number of bytes stored in pP->pString will be returned in pP->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key. |
pQ | [ INOUT ] One of the DSA parameters. If pQ->pString is NULL, then all the buffer required lengths will be returned. pQ->length is the address of a P6UINT32 containing the size in bytes of pQ->pString. On success the number of bytes stored in pQ->pString will be returned in pQ->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key. |
pG | [ INOUT ] One of the DSA parameters. If pG->pString is NULL, then all the buffer required lengths will be returned. pG->length is the address of an P6UINT32 containing the size in bytes of pG->pString. On success the number of bytes stored in pG->pString will be returned in pG->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key. |
pX | [ INOUT ] The public key value. If pX->pString is NULL, then all the buffer required lengths will be returned. pX->length is the address of an P6UINT32 containing the size in bytes of pX->pString. On success the number of bytes stored in pY->pString will be returned in pX->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key. |
- Returns
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | Object is in an incorrect state. |
P6R::eInvalidArg | One of the pointers is NULL. |
P6R::eWrongKeyClass | The class of this key is not CKC_PRIVATE. |
P6R::eWrongKeyType | Must be DSA |
P6R::eTooSmall | One of the buffers is too small to hold the requested value. |