mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-08 16:27:31 +09:00
Issue #1338 - Part 2: Update NSS to 3.48-RTM
This commit is contained in:
parent
1a92143e68
commit
c57cac24e8
885 changed files with 1650639 additions and 59530 deletions
|
|
@ -2060,6 +2060,16 @@ EC_CopyParams(PLArenaPool *arena, ECParams *dstParams,
|
|||
return (vector->p_EC_CopyParams)(arena, dstParams, srcParams);
|
||||
}
|
||||
|
||||
SECStatus
|
||||
ChaCha20_Xor(unsigned char *output, const unsigned char *block, unsigned int len,
|
||||
const unsigned char *k, const unsigned char *nonce, PRUint32 ctr)
|
||||
{
|
||||
if (!vector && PR_SUCCESS != freebl_RunLoaderOnce()) {
|
||||
return SECFailure;
|
||||
}
|
||||
return (vector->p_ChaCha20_Xor)(output, block, len, k, nonce, ctr);
|
||||
}
|
||||
|
||||
SECStatus
|
||||
ChaCha20Poly1305_InitContext(ChaCha20Poly1305Context *ctx,
|
||||
const unsigned char *key, unsigned int keyLen,
|
||||
|
|
@ -2235,3 +2245,54 @@ BLAKE2B_Resurrect(unsigned char *space, void *arg)
|
|||
}
|
||||
return (vector->p_BLAKE2B_Resurrect)(space, arg);
|
||||
}
|
||||
|
||||
/* == New for CMAC == */
|
||||
SECStatus
|
||||
CMAC_Init(CMACContext *ctx, CMACCipher type, const unsigned char *key,
|
||||
unsigned int key_len)
|
||||
{
|
||||
if (!vector && PR_SUCCESS != freebl_RunLoaderOnce())
|
||||
return SECFailure;
|
||||
return (vector->p_CMAC_Init)(ctx, type, key, key_len);
|
||||
}
|
||||
|
||||
CMACContext *
|
||||
CMAC_Create(CMACCipher type, const unsigned char *key, unsigned int key_len)
|
||||
{
|
||||
if (!vector && PR_SUCCESS != freebl_RunLoaderOnce())
|
||||
return NULL;
|
||||
return (vector->p_CMAC_Create)(type, key, key_len);
|
||||
}
|
||||
|
||||
SECStatus
|
||||
CMAC_Begin(CMACContext *ctx)
|
||||
{
|
||||
if (!vector && PR_SUCCESS != freebl_RunLoaderOnce())
|
||||
return SECFailure;
|
||||
return (vector->p_CMAC_Begin)(ctx);
|
||||
}
|
||||
|
||||
SECStatus
|
||||
CMAC_Update(CMACContext *ctx, const unsigned char *data, unsigned int data_len)
|
||||
{
|
||||
if (!vector && PR_SUCCESS != freebl_RunLoaderOnce())
|
||||
return SECFailure;
|
||||
return (vector->p_CMAC_Update)(ctx, data, data_len);
|
||||
}
|
||||
|
||||
SECStatus
|
||||
CMAC_Finish(CMACContext *ctx, unsigned char *result, unsigned int *result_len,
|
||||
unsigned int max_result_len)
|
||||
{
|
||||
if (!vector && PR_SUCCESS != freebl_RunLoaderOnce())
|
||||
return SECFailure;
|
||||
return (vector->p_CMAC_Finish)(ctx, result, result_len, max_result_len);
|
||||
}
|
||||
|
||||
void
|
||||
CMAC_Destroy(CMACContext *ctx, PRBool free_it)
|
||||
{
|
||||
if (!vector && PR_SUCCESS != freebl_RunLoaderOnce())
|
||||
return;
|
||||
(vector->p_CMAC_Destroy)(ctx, free_it);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue