Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: mozilla/security/nss/lib/cryptohi/cryptohi.h

Issue 606034: NSS: update to 3.12.6 RC0 (Closed)
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * crypto.h - public data structures and prototypes for the crypto library 2 * crypto.h - public data structures and prototypes for the crypto library
3 * 3 *
4 * ***** BEGIN LICENSE BLOCK ***** 4 * ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * 6 *
7 * The contents of this file are subject to the Mozilla Public License Version 7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with 8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at 9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/ 10 * http://www.mozilla.org/MPL/
(...skipping 19 matching lines...) Expand all
30 * in which case the provisions of the GPL or the LGPL are applicable instead 30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only 31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to 32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your 33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice 34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete 35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under 36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL. 37 * the terms of any one of the MPL, the GPL or the LGPL.
38 * 38 *
39 * ***** END LICENSE BLOCK ***** */ 39 * ***** END LICENSE BLOCK ***** */
40 /* $Id: cryptohi.h,v 1.13 2009/09/23 22:51:56 wtc%google.com Exp $ */ 40 /* $Id: cryptohi.h,v 1.14 2010/02/10 00:49:43 wtc%google.com Exp $ */
41 41
42 #ifndef _CRYPTOHI_H_ 42 #ifndef _CRYPTOHI_H_
43 #define _CRYPTOHI_H_ 43 #define _CRYPTOHI_H_
44 44
45 #include "blapit.h" 45 #include "blapit.h"
46 46
47 #include "seccomon.h" 47 #include "seccomon.h"
48 #include "secoidt.h" 48 #include "secoidt.h"
49 #include "secdert.h" 49 #include "secdert.h"
50 #include "cryptoht.h" 50 #include "cryptoht.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 /* 130 /*
131 ** Sign a single block of data using private key encryption and given 131 ** Sign a single block of data using private key encryption and given
132 ** signature/hash algorithm. 132 ** signature/hash algorithm.
133 ** "result" the final signature data (memory is allocated) 133 ** "result" the final signature data (memory is allocated)
134 ** "buf" the input data to sign 134 ** "buf" the input data to sign
135 ** "len" the amount of data to sign 135 ** "len" the amount of data to sign
136 ** "pk" the private key to encrypt with 136 ** "pk" the private key to encrypt with
137 ** "algid" the signature/hash algorithm to sign with 137 ** "algid" the signature/hash algorithm to sign with
138 ** (must be compatible with the key type). 138 ** (must be compatible with the key type).
139 */ 139 */
140 extern SECStatus SEC_SignData(SECItem *result, unsigned char *buf, int len, 140 extern SECStatus SEC_SignData(SECItem *result,
141 » » » const unsigned char *buf, int len,
141 SECKEYPrivateKey *pk, SECOidTag algid); 142 SECKEYPrivateKey *pk, SECOidTag algid);
142 143
143 /* 144 /*
144 ** Sign a pre-digested block of data using private key encryption, encoding 145 ** Sign a pre-digested block of data using private key encryption, encoding
145 ** The given signature/hash algorithm. 146 ** The given signature/hash algorithm.
146 ** "result" the final signature data (memory is allocated) 147 ** "result" the final signature data (memory is allocated)
147 ** "digest" the digest to sign 148 ** "digest" the digest to sign
148 ** "pk" the private key to encrypt with 149 ** "pk" the private key to encrypt with
149 ** "algtag" The algorithm tag to encode (need for RSA only) 150 ** "algtag" The algorithm tag to encode (need for RSA only)
150 */ 151 */
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 ** This function is deprecated. Use VFY_VerifyDataDirect or 342 ** This function is deprecated. Use VFY_VerifyDataDirect or
342 ** VFY_VerifyDataWithAlgorithmID instead. 343 ** VFY_VerifyDataWithAlgorithmID instead.
343 ** "buf" the input data 344 ** "buf" the input data
344 ** "len" the length of the input data 345 ** "len" the length of the input data
345 ** "key" the public key to check the signature with 346 ** "key" the public key to check the signature with
346 ** "sig" the encrypted signature data 347 ** "sig" the encrypted signature data
347 ** "sigAlg" specifies the signing algorithm to use. This must match 348 ** "sigAlg" specifies the signing algorithm to use. This must match
348 ** the key type. 349 ** the key type.
349 ** "wincx" void pointer to the window context 350 ** "wincx" void pointer to the window context
350 */ 351 */
351 extern SECStatus VFY_VerifyData(unsigned char *buf, int len, 352 extern SECStatus VFY_VerifyData(const unsigned char *buf, int len,
352 » » » » SECKEYPublicKey *key, SECItem *sig, 353 » » » » const SECKEYPublicKey *key, const SECItem *sig,
353 SECOidTag sigAlg, void *wincx); 354 SECOidTag sigAlg, void *wincx);
354 /* 355 /*
355 ** Verify the signature on a block of data. The signature data is an RSA 356 ** Verify the signature on a block of data. The signature data is an RSA
356 ** private key encrypted block of data formatted according to PKCS#1. 357 ** private key encrypted block of data formatted according to PKCS#1.
357 ** "buf" the input data 358 ** "buf" the input data
358 ** "len" the length of the input data 359 ** "len" the length of the input data
359 ** "key" the public key to check the signature with 360 ** "key" the public key to check the signature with
360 ** "sig" the encrypted signature data 361 ** "sig" the encrypted signature data
361 ** "pubkAlg" specifies the cryptographic signing algorithm to use (the 362 ** "pubkAlg" specifies the cryptographic signing algorithm to use (the
362 ** raw algorithm without any hash specified. This must match the key 363 ** raw algorithm without any hash specified. This must match the key
(...skipping 21 matching lines...) Expand all
384 ** "key" the public key to check the signature with 385 ** "key" the public key to check the signature with
385 ** "sig" the encrypted signature data 386 ** "sig" the encrypted signature data
386 ** "algid" specifies the signing algorithm and parameters to use. 387 ** "algid" specifies the signing algorithm and parameters to use.
387 ** This must match the key type. 388 ** This must match the key type.
388 ** "hash" optional pointer to return the oid of the actual hash used in 389 ** "hash" optional pointer to return the oid of the actual hash used in
389 ** the signature. If this value is NULL no, hash oid is returned. 390 ** the signature. If this value is NULL no, hash oid is returned.
390 ** "wincx" void pointer to the window context 391 ** "wincx" void pointer to the window context
391 */ 392 */
392 extern SECStatus VFY_VerifyDataWithAlgorithmID(const unsigned char *buf, 393 extern SECStatus VFY_VerifyDataWithAlgorithmID(const unsigned char *buf,
393 int len, const SECKEYPublicKey *key, 394 int len, const SECKEYPublicKey *key,
394 » » » » const SECItem *sig, 395 » » » » const SECItem *sig,
395 const SECAlgorithmID *algid, SECOidTag *hash, 396 const SECAlgorithmID *algid, SECOidTag *hash,
396 void *wincx); 397 void *wincx);
397 398
398 399
399 SEC_END_PROTOS 400 SEC_END_PROTOS
400 401
401 #endif /* _CRYPTOHI_H_ */ 402 #endif /* _CRYPTOHI_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698