if (keyLabelLength > sizeof(keyLabel))
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
+ CCA4758err(CCA4758_F_IBM_4758_LOAD_PRIVKEY,
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
return NULL;
}
keyToken = OPENSSL_malloc(MAX_CCA_PKA_TOKEN_SIZE + sizeof(long));
if (!keyToken)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
+ CCA4758err(CCA4758_F_IBM_4758_LOAD_PRIVKEY,
ERR_R_MALLOC_FAILURE);
goto err;
}
if (returnCode)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
+ CCA4758err(CCA4758_F_IBM_4758_LOAD_PRIVKEY,
CCA4758_R_FAILED_LOADING_PRIVATE_KEY);
goto err;
}
if (returnCode)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
+ CCA4758err(CCA4758_F_IBM_4758_LOAD_PRIVKEY,
CCA4758_R_FAILED_LOADING_PRIVATE_KEY);
goto err;
}
exponent, &modulusLength, &modulusFieldLength,
modulus))
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
+ CCA4758err(CCA4758_F_IBM_4758_LOAD_PRIVKEY,
CCA4758_R_FAILED_LOADING_PRIVATE_KEY);
goto err;
}
if (keyLabelLength > sizeof(keyLabel))
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
+ CCA4758err(CCA4758_F_IBM_4758_LOAD_PUBKEY,
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
return NULL;
}
keyToken = OPENSSL_malloc(MAX_CCA_PKA_TOKEN_SIZE + sizeof(long));
if (!keyToken)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PUBKEY,
+ CCA4758err(CCA4758_F_IBM_4758_LOAD_PUBKEY,
ERR_R_MALLOC_FAILURE);
goto err;
}
if (returnCode)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
+ CCA4758err(CCA4758_F_IBM_4758_LOAD_PUBKEY,
ERR_R_MALLOC_FAILURE);
goto err;
}
if (!getModulusAndExponent(keyToken+sizeof(long), &exponentLength,
exponent, &modulusLength, &modulusFieldLength, modulus))
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_LOAD_PRIVKEY,
+ CCA4758err(CCA4758_F_IBM_4758_LOAD_PUBKEY,
CCA4758_R_FAILED_LOADING_PUBLIC_KEY);
goto err;
}
if (!algorithm.algorithm)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
+ CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
CCA4758_R_UNKNOWN_ALGORITHM_TYPE);
return 0;
}
if (!algorithm.algorithm->length)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
+ CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
CCA4758_R_ASN1_OID_UNKNOWN_FOR_MD);
return 0;
}
if (length - RSA_PKCS1_PADDING > keyLength)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
+ CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
return 0;
}
case NID_md5_sha1 :
if (m_len != SSL_SIG_LEN)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
+ CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
return 0;
}
(unsigned int)keyLength+1);
if (!hashBuffer)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
+ CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
ERR_R_MALLOC_FAILURE);
return 0;
}
(unsigned int)keyLength+1);
if (!hashBuffer)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
+ CCA4758err(CCA4758_F_CCA_RSA_VERIFY,
ERR_R_MALLOC_FAILURE);
return 0;
}
if (!algorithm.algorithm)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_SIGN,
+ CCA4758err(CCA4758_F_CCA_RSA_SIGN,
CCA4758_R_UNKNOWN_ALGORITHM_TYPE);
return 0;
}
if (!algorithm.algorithm->length)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_SIGN,
+ CCA4758err(CCA4758_F_CCA_RSA_SIGN,
CCA4758_R_ASN1_OID_UNKNOWN_FOR_MD);
return 0;
}
if (length - RSA_PKCS1_PADDING > keyLength)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_SIGN,
+ CCA4758err(CCA4758_F_CCA_RSA_SIGN,
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
return 0;
}
case NID_md5_sha1 :
if (m_len != SSL_SIG_LEN)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_SIGN,
+ CCA4758err(CCA4758_F_CCA_RSA_SIGN,
CCA4758_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
return 0;
}
(unsigned int)keyLength+1);
if (!hashBuffer)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
+ CCA4758err(CCA4758_F_CCA_RSA_SIGN,
ERR_R_MALLOC_FAILURE);
return 0;
}
(unsigned int)keyLength+1);
if (!hashBuffer)
{
- CCA4758err(CCA4758_F_IBM_4758_CCA_VERIFY,
+ CCA4758err(CCA4758_F_CCA_RSA_SIGN,
ERR_R_MALLOC_FAILURE);
return 0;
}