Index: nss/lib/cryptohi/cryptohi.h |
diff --git a/nss/lib/cryptohi/cryptohi.h b/nss/lib/cryptohi/cryptohi.h |
index 6661b664426767aaa4b71285f9d42352de9ed438..f658daa9eff9e1737460063864faf933b8f15107 100644 |
--- a/nss/lib/cryptohi/cryptohi.h |
+++ b/nss/lib/cryptohi/cryptohi.h |
@@ -17,10 +17,8 @@ |
#include "keyt.h" |
#include "certt.h" |
- |
SEC_BEGIN_PROTOS |
- |
/****************************************/ |
/* |
** DER encode/decode (EC)DSA signatures |
@@ -39,14 +37,14 @@ extern SECItem *DSAU_DecodeDerSig(const SECItem *item); |
* on the size of q or the EC key used for signing. |
* |
* We can reuse the DSAU_EncodeDerSig interface to DER encode |
- * raw ECDSA signature keeping in mind that the length of r |
+ * raw ECDSA signature keeping in mind that the length of r |
* is the same as that of s and exactly half of src->len. |
* |
* For decoding, we need to pass the length of the desired |
* raw signature (twice the key size) explicitly. |
*/ |
-extern SECStatus DSAU_EncodeDerSigWithLen(SECItem *dest, SECItem *src, |
- unsigned int len); |
+extern SECStatus DSAU_EncodeDerSigWithLen(SECItem *dest, SECItem *src, |
+ unsigned int len); |
extern SECItem *DSAU_DecodeDerSigToLen(const SECItem *item, unsigned int len); |
/****************************************/ |
@@ -81,7 +79,7 @@ extern SECStatus SGN_Begin(SGNContext *cx); |
** "inputLen" the length of the input data |
*/ |
extern SECStatus SGN_Update(SGNContext *cx, const unsigned char *input, |
- unsigned int inputLen); |
+ unsigned int inputLen); |
/* |
** Finish the signature process. Use either k0 or k1 to sign the data |
@@ -100,12 +98,12 @@ extern SECStatus SGN_End(SGNContext *cx, SECItem *result); |
** "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 |
+** "algid" the signature/hash algorithm to sign with |
** (must be compatible with the key type). |
*/ |
extern SECStatus SEC_SignData(SECItem *result, |
- const unsigned char *buf, int len, |
- SECKEYPrivateKey *pk, SECOidTag algid); |
+ const unsigned char *buf, int len, |
+ SECKEYPrivateKey *pk, SECOidTag algid); |
/* |
** Sign a pre-digested block of data using private key encryption, encoding |
@@ -116,7 +114,7 @@ extern SECStatus SEC_SignData(SECItem *result, |
** "algtag" The algorithm tag to encode (need for RSA only) |
*/ |
extern SECStatus SGN_Digest(SECKEYPrivateKey *privKey, |
- SECOidTag algtag, SECItem *result, SECItem *digest); |
+ SECOidTag algtag, SECItem *result, SECItem *digest); |
/* |
** DER sign a single block of data using private key encryption and the |
@@ -130,8 +128,8 @@ extern SECStatus SGN_Digest(SECKEYPrivateKey *privKey, |
** "pk" the private key to encrypt with |
*/ |
extern SECStatus SEC_DerSignData(PLArenaPool *arena, SECItem *result, |
- const unsigned char *buf, int len, |
- SECKEYPrivateKey *pk, SECOidTag algid); |
+ const unsigned char *buf, int len, |
+ SECKEYPrivateKey *pk, SECOidTag algid); |
/* |
** Destroy a signed-data object. |
@@ -155,18 +153,18 @@ extern SECOidTag SEC_GetSignatureAlgorithmOidTag(KeyType keyType, |
/* |
** Create a signature verification context. This version is deprecated, |
-** This function is deprecated. Use VFY_CreateContextDirect or |
+** This function is deprecated. Use VFY_CreateContextDirect or |
** VFY_CreateContextWithAlgorithmID instead. |
** "key" the public key to verify with |
** "sig" the encrypted signature data if sig is NULL then |
** VFY_EndWithSignature must be called with the correct signature at |
** the end of the processing. |
-** "sigAlg" specifies the signing algorithm to use (including the |
+** "sigAlg" specifies the signing algorithm to use (including the |
** hash algorthim). This must match the key type. |
** "wincx" void pointer to the window context |
*/ |
extern VFYContext *VFY_CreateContext(SECKEYPublicKey *key, SECItem *sig, |
- SECOidTag sigAlg, void *wincx); |
+ SECOidTag sigAlg, void *wincx); |
/* |
** Create a signature verification context. |
** "key" the public key to verify with |
@@ -174,9 +172,9 @@ extern VFYContext *VFY_CreateContext(SECKEYPublicKey *key, SECItem *sig, |
** VFY_EndWithSignature must be called with the correct signature at |
** the end of the processing. |
** "pubkAlg" specifies the cryptographic signing algorithm to use (the |
-** raw algorithm without any hash specified. This must match the key |
+** raw algorithm without any hash specified. This must match the key |
** type. |
-** "hashAlg" specifies the hashing algorithm used. If the key is an |
+** "hashAlg" specifies the hashing algorithm used. If the key is an |
** RSA key, and sig is not NULL, then hashAlg can be SEC_OID_UNKNOWN. |
** the hash is selected from data in the sig. |
** "hash" optional pointer to return the actual hash algorithm used. |
@@ -186,10 +184,10 @@ extern VFYContext *VFY_CreateContext(SECKEYPublicKey *key, SECItem *sig, |
** "wincx" void pointer to the window context |
*/ |
extern VFYContext *VFY_CreateContextDirect(const SECKEYPublicKey *key, |
- const SECItem *sig, |
- SECOidTag pubkAlg, |
- SECOidTag hashAlg, |
- SECOidTag *hash, void *wincx); |
+ const SECItem *sig, |
+ SECOidTag pubkAlg, |
+ SECOidTag hashAlg, |
+ SECOidTag *hash, void *wincx); |
/* |
** Create a signature verification context from a algorithm ID. |
** "key" the public key to verify with |
@@ -198,15 +196,15 @@ extern VFYContext *VFY_CreateContextDirect(const SECKEYPublicKey *key, |
** the end of the processing. |
** "algid" specifies the signing algorithm and parameters to use. |
** This must match the key type. |
-** "hash" optional pointer to return the oid of the actual hash used in |
+** "hash" optional pointer to return the oid of the actual hash used in |
** the signature. If this value is NULL no, hash oid is returned. |
** "wincx" void pointer to the window context |
*/ |
-extern VFYContext *VFY_CreateContextWithAlgorithmID(const SECKEYPublicKey *key, |
- const SECItem *sig, |
- const SECAlgorithmID *algid, |
- SECOidTag *hash, |
- void *wincx); |
+extern VFYContext *VFY_CreateContextWithAlgorithmID(const SECKEYPublicKey *key, |
+ const SECItem *sig, |
+ const SECAlgorithmID *algid, |
+ SECOidTag *hash, |
+ void *wincx); |
/* |
** Destroy a verification-context object. |
@@ -226,7 +224,7 @@ extern SECStatus VFY_Begin(VFYContext *cx); |
** "inputLen" the amount of input data |
*/ |
extern SECStatus VFY_Update(VFYContext *cx, const unsigned char *input, |
- unsigned int inputLen); |
+ unsigned int inputLen); |
/* |
** Finish the verification process. The return value is a status which |
@@ -243,19 +241,18 @@ extern SECStatus VFY_End(VFYContext *cx); |
** returned. Otherwise, SECFailure is returned and the error code found |
** using PORT_GetError() indicates what failure occurred. If signature is |
** supplied the verification uses this signature to verify, otherwise the |
-** signature passed in VFY_CreateContext() is used. |
+** signature passed in VFY_CreateContext() is used. |
** VFY_EndWithSignature(cx,NULL); is identical to VFY_End(cx);. |
** "cx" the context |
** "sig" the encrypted signature data |
*/ |
extern SECStatus VFY_EndWithSignature(VFYContext *cx, SECItem *sig); |
- |
/* |
** Verify the signature on a block of data for which we already have |
** the digest. The signature data is an RSA private key encrypted |
** block of data formatted according to PKCS#1. |
-** This function is deprecated. Use VFY_VerifyDigestDirect or |
+** This function is deprecated. Use VFY_VerifyDigestDirect or |
** VFY_VerifyDigestWithAlgorithmID instead. |
** "dig" the digest |
** "key" the public key to check the signature with |
@@ -265,7 +262,7 @@ extern SECStatus VFY_EndWithSignature(VFYContext *cx, SECItem *sig); |
** "wincx" void pointer to the window context |
**/ |
extern SECStatus VFY_VerifyDigest(SECItem *dig, SECKEYPublicKey *key, |
- SECItem *sig, SECOidTag sigAlg, void *wincx); |
+ SECItem *sig, SECOidTag sigAlg, void *wincx); |
/* |
** Verify the signature on a block of data for which we already have |
** the digest. The signature data is an RSA private key encrypted |
@@ -274,15 +271,15 @@ extern SECStatus VFY_VerifyDigest(SECItem *dig, SECKEYPublicKey *key, |
** "key" the public key to check the signature with |
** "sig" the encrypted signature data |
** "pubkAlg" specifies the cryptographic signing algorithm to use (the |
-** raw algorithm without any hash specified. This must match the key |
+** raw algorithm without any hash specified. This must match the key |
** type. |
** "hashAlg" specifies the hashing algorithm used. |
** "wincx" void pointer to the window context |
**/ |
-extern SECStatus VFY_VerifyDigestDirect(const SECItem *dig, |
- const SECKEYPublicKey *key, |
- const SECItem *sig, SECOidTag pubkAlg, |
- SECOidTag hashAlg, void *wincx); |
+extern SECStatus VFY_VerifyDigestDirect(const SECItem *dig, |
+ const SECKEYPublicKey *key, |
+ const SECItem *sig, SECOidTag pubkAlg, |
+ SECOidTag hashAlg, void *wincx); |
/* |
** Verify the signature on a block of data for which we already have |
** the digest. The signature data is an RSA private key encrypted |
@@ -297,15 +294,15 @@ extern SECStatus VFY_VerifyDigestDirect(const SECItem *dig, |
** not set to SEC_OID_UNKNOWN, it must match the hash of the signature. |
** "wincx" void pointer to the window context |
*/ |
-extern SECStatus VFY_VerifyDigestWithAlgorithmID(const SECItem *dig, |
- const SECKEYPublicKey *key, const SECItem *sig, |
- const SECAlgorithmID *algid, SECOidTag hash, |
- void *wincx); |
+extern SECStatus VFY_VerifyDigestWithAlgorithmID(const SECItem *dig, |
+ const SECKEYPublicKey *key, const SECItem *sig, |
+ const SECAlgorithmID *algid, SECOidTag hash, |
+ void *wincx); |
/* |
** Verify the signature on a block of data. The signature data is an RSA |
** private key encrypted block of data formatted according to PKCS#1. |
-** This function is deprecated. Use VFY_VerifyDataDirect or |
+** This function is deprecated. Use VFY_VerifyDataDirect or |
** VFY_VerifyDataWithAlgorithmID instead. |
** "buf" the input data |
** "len" the length of the input data |
@@ -316,8 +313,8 @@ extern SECStatus VFY_VerifyDigestWithAlgorithmID(const SECItem *dig, |
** "wincx" void pointer to the window context |
*/ |
extern SECStatus VFY_VerifyData(const unsigned char *buf, int len, |
- const SECKEYPublicKey *key, const SECItem *sig, |
- SECOidTag sigAlg, void *wincx); |
+ const SECKEYPublicKey *key, const SECItem *sig, |
+ SECOidTag sigAlg, void *wincx); |
/* |
** Verify the signature on a block of data. The signature data is an RSA |
** private key encrypted block of data formatted according to PKCS#1. |
@@ -326,9 +323,9 @@ extern SECStatus VFY_VerifyData(const unsigned char *buf, int len, |
** "key" the public key to check the signature with |
** "sig" the encrypted signature data |
** "pubkAlg" specifies the cryptographic signing algorithm to use (the |
-** raw algorithm without any hash specified. This must match the key |
+** raw algorithm without any hash specified. This must match the key |
** type. |
-** "hashAlg" specifies the hashing algorithm used. If the key is an |
+** "hashAlg" specifies the hashing algorithm used. If the key is an |
** RSA key, and sig is not NULL, then hashAlg can be SEC_OID_UNKNOWN. |
** the hash is selected from data in the sig. |
** "hash" optional pointer to return the actual hash algorithm used. |
@@ -338,10 +335,10 @@ extern SECStatus VFY_VerifyData(const unsigned char *buf, int len, |
** "wincx" void pointer to the window context |
*/ |
extern SECStatus VFY_VerifyDataDirect(const unsigned char *buf, int len, |
- const SECKEYPublicKey *key, |
- const SECItem *sig, |
- SECOidTag pubkAlg, SECOidTag hashAlg, |
- SECOidTag *hash, void *wincx); |
+ const SECKEYPublicKey *key, |
+ const SECItem *sig, |
+ SECOidTag pubkAlg, SECOidTag hashAlg, |
+ SECOidTag *hash, void *wincx); |
/* |
** Verify the signature on a block of data. The signature data is an RSA |
@@ -352,16 +349,15 @@ extern SECStatus VFY_VerifyDataDirect(const unsigned char *buf, int len, |
** "sig" the encrypted signature data |
** "algid" specifies the signing algorithm and parameters to use. |
** This must match the key type. |
-** "hash" optional pointer to return the oid of the actual hash used in |
+** "hash" optional pointer to return the oid of the actual hash used in |
** the signature. If this value is NULL no, hash oid is returned. |
** "wincx" void pointer to the window context |
*/ |
-extern SECStatus VFY_VerifyDataWithAlgorithmID(const unsigned char *buf, |
- int len, const SECKEYPublicKey *key, |
- const SECItem *sig, |
- const SECAlgorithmID *algid, SECOidTag *hash, |
- void *wincx); |
- |
+extern SECStatus VFY_VerifyDataWithAlgorithmID(const unsigned char *buf, |
+ int len, const SECKEYPublicKey *key, |
+ const SECItem *sig, |
+ const SECAlgorithmID *algid, SECOidTag *hash, |
+ void *wincx); |
SEC_END_PROTOS |