| | |
| | | sizeof(pubk), 0))) { |
| | | result = FUNC_RET_OK; |
| | | } else { |
| | | #ifdef _DEBUG |
| | | #ifndef NDEBUG |
| | | formatError(status, "error importing public key"); |
| | | #endif |
| | | } |
| | |
| | | result = FUNC_RET_OK; |
| | | } else { |
| | | result = FUNC_RET_ERROR; |
| | | #ifdef _DEBUG |
| | | #ifndef NDEBUG |
| | | formatError(status, "error verifying signature"); |
| | | #endif |
| | | } |
| | |
| | | } |
| | | else { |
| | | result = FUNC_RET_NOT_AVAIL; |
| | | #ifdef _DEBUG |
| | | #ifndef NDEBUG |
| | | formatError(status, "error opening RSA provider"); |
| | | #endif |
| | | } |
| | |
| | | result = verifyHash(pbHashData, cbHashDataLenght, signatureB64); |
| | | } else { |
| | | result = FUNC_RET_NOT_AVAIL; |
| | | #ifdef _DEBUG |
| | | #ifndef NDEBUG |
| | | formatError(status, "error hashing data"); |
| | | #endif |
| | | } |
| | | } else { |
| | | result = FUNC_RET_NOT_AVAIL; |
| | | #ifdef _DEBUG |
| | | #ifndef NDEBUG |
| | | formatError(status, "error creating hash"); |
| | | #endif |
| | | } |
| | |
| | | } |
| | | } else { |
| | | result = FUNC_RET_NOT_AVAIL; |
| | | #ifdef _DEBUG |
| | | #ifndef NDEBUG |
| | | formatError(status, "**** Error returned by BCryptGetProperty"); |
| | | #endif |
| | | } |