mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 00:17:32 +09:00
Update NSS to 3.35-RTM
This commit is contained in:
parent
23de11e5cd
commit
608f9fca02
388 changed files with 39075 additions and 20752 deletions
|
|
@ -59,6 +59,14 @@ extern SECItem *DSAU_DecodeDerSigToLen(const SECItem *item, unsigned int len);
|
|||
*/
|
||||
extern SGNContext *SGN_NewContext(SECOidTag alg, SECKEYPrivateKey *privKey);
|
||||
|
||||
/*
|
||||
** Create a new signature context from an algorithmID.
|
||||
** "alg" the signature algorithm to use
|
||||
** "privKey" the private key to use
|
||||
*/
|
||||
extern SGNContext *SGN_NewContextWithAlgorithmID(SECAlgorithmID *alg,
|
||||
SECKEYPrivateKey *privKey);
|
||||
|
||||
/*
|
||||
** Destroy a signature-context object
|
||||
** "cx" the object
|
||||
|
|
@ -105,6 +113,21 @@ extern SECStatus SEC_SignData(SECItem *result,
|
|||
const unsigned char *buf, int len,
|
||||
SECKEYPrivateKey *pk, SECOidTag algid);
|
||||
|
||||
/*
|
||||
** Sign a single block of data using private key encryption and given
|
||||
** signature/hash algorithm with parameters from an algorithmID.
|
||||
** "result" the final signature data (memory is allocated)
|
||||
** "buf" the input data to sign
|
||||
** "len" the amount of data to sign
|
||||
** "pk" the private key to encrypt with
|
||||
** "algid" the signature/hash algorithm to sign with
|
||||
** (must be compatible with the key type).
|
||||
*/
|
||||
extern SECStatus SEC_SignDataWithAlgorithmID(SECItem *result,
|
||||
const unsigned char *buf, int len,
|
||||
SECKEYPrivateKey *pk,
|
||||
SECAlgorithmID *algid);
|
||||
|
||||
/*
|
||||
** Sign a pre-digested block of data using private key encryption, encoding
|
||||
** The given signature/hash algorithm.
|
||||
|
|
@ -131,6 +154,27 @@ extern SECStatus SEC_DerSignData(PLArenaPool *arena, SECItem *result,
|
|||
const unsigned char *buf, int len,
|
||||
SECKEYPrivateKey *pk, SECOidTag algid);
|
||||
|
||||
/*
|
||||
** DER sign a single block of data using private key encryption and
|
||||
** the given signature/hash algorithm with parameters from an
|
||||
** algorithmID. This routine first computes a digital signature using
|
||||
** SEC_SignData, then wraps it with an CERTSignedData and then der
|
||||
** encodes the result.
|
||||
** "arena" is the memory arena to use to allocate data from
|
||||
** "result" the final der encoded data (memory is allocated)
|
||||
** "buf" the input data to sign
|
||||
** "len" the amount of data to sign
|
||||
** "pk" the private key to encrypt with
|
||||
** "algid" the signature/hash algorithm to sign with
|
||||
** (must be compatible with the key type).
|
||||
*/
|
||||
extern SECStatus SEC_DerSignDataWithAlgorithmID(PLArenaPool *arena,
|
||||
SECItem *result,
|
||||
const unsigned char *buf,
|
||||
int len,
|
||||
SECKEYPrivateKey *pk,
|
||||
SECAlgorithmID *algid);
|
||||
|
||||
/*
|
||||
** Destroy a signed-data object.
|
||||
** "sd" the object
|
||||
|
|
@ -146,6 +190,23 @@ extern void SEC_DestroySignedData(CERTSignedData *sd, PRBool freeit);
|
|||
extern SECOidTag SEC_GetSignatureAlgorithmOidTag(KeyType keyType,
|
||||
SECOidTag hashAlgTag);
|
||||
|
||||
/*
|
||||
** Create algorithm parameters for signing. Return a new item
|
||||
** allocated from arena, or NULL on failure.
|
||||
** "arena" is the memory arena to use to allocate data from
|
||||
** "result" the encoded parameters (memory is allocated)
|
||||
** "signAlgTag" is the signing algorithm
|
||||
** "hashAlgTag" is the preferred hash algorithm
|
||||
** "params" is the default parameters
|
||||
** "key" is the private key
|
||||
*/
|
||||
extern SECItem *SEC_CreateSignatureAlgorithmParameters(PLArenaPool *arena,
|
||||
SECItem *result,
|
||||
SECOidTag signAlgTag,
|
||||
SECOidTag hashAlgTag,
|
||||
const SECItem *params,
|
||||
const SECKEYPrivateKey *key);
|
||||
|
||||
/****************************************/
|
||||
/*
|
||||
** Signature verification operations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue