/*
* The Initial Developer of the Original Code is International
* Business Machines Corporation. Portions created by IBM
* Corporation are Copyright (C) 2005 International Business
* Machines Corporation. All Rights Reserved.
*
* it under the terms of the Common Public License as published by
* IBM Corporation; either version 1 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Common Public License for more details.
*
* You should have received a copy of the Common Public License
* along with this program; if not, a copy can be viewed at
*/
/* (C) COPYRIGHT International Business Machines Corp. 2001, 2002, 2005 */
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "tpmtok_int.h"
{
return (CKR_FUNCTION_FAILED);
}
if (length_only == TRUE) {
return (CKR_OK);
}
return (CKR_HOST_MEMORY);
return (CKR_OK);
}
CK_ULONG * out_data_len) {
CK_ULONG i;
return (CKR_FUNCTION_FAILED);
}
if (hmac_len == 0) {
*out_data_len = 0;
return (CKR_OK);
}
} else {
}
*out_data_len = hmac_len;
if (length_only == TRUE) {
return (CKR_OK);
}
return (rc);
}
return (CKR_FUNCTION_FAILED);
} else
if (key_bytes > SHA1_BLOCK_SIZE) {
(void) digest_mgr_cleanup(&digest_ctx);
return (rc);
}
(void) digest_mgr_cleanup(&digest_ctx);
return (rc);
}
(void) digest_mgr_cleanup(&digest_ctx);
for (i = 0; i < hash_len; i++) {
}
} else {
for (i = 0; i < key_bytes; i++) {
}
}
(void) digest_mgr_cleanup(&digest_ctx);
return (rc);
}
(void) digest_mgr_cleanup(&digest_ctx);
return (rc);
}
(void) digest_mgr_cleanup(&digest_ctx);
return (rc);
}
(void) digest_mgr_cleanup(&digest_ctx);
return (rc);
}
(void) digest_mgr_cleanup(&digest_ctx);
(void) digest_mgr_cleanup(&digest_ctx);
return (rc);
}
(void) digest_mgr_cleanup(&digest_ctx);
return (rc);
}
(void) digest_mgr_cleanup(&digest_ctx);
return (rc);
}
(void) digest_mgr_cleanup(&digest_ctx);
return (rc);
}
*out_data_len = hmac_len;
(void) digest_mgr_cleanup(&digest_ctx);
return (CKR_OK);
}
{
return (CKR_FUNCTION_FAILED);
}
else
goto done;
}
goto done;
}
goto done;
}
}
done:
(void) sign_mgr_cleanup(&hmac_ctx);
return (rc);
}