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

Side by Side Diff: mozilla/security/nss/lib/pk11wrap/pk11pub.h

Issue 12668022: Make CKM_AES_GCM usable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 #ifndef _PK11PUB_H_ 4 #ifndef _PK11PUB_H_
5 #define _PK11PUB_H_ 5 #define _PK11PUB_H_
6 #include "plarena.h" 6 #include "plarena.h"
7 #include "seccomon.h" 7 #include "seccomon.h"
8 #include "secoidt.h" 8 #include "secoidt.h"
9 #include "secdert.h" 9 #include "secdert.h"
10 #include "keyt.h" 10 #include "keyt.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 SECKEYPrivateKey *PK11_GenerateKeyPair(PK11SlotInfo *slot, 501 SECKEYPrivateKey *PK11_GenerateKeyPair(PK11SlotInfo *slot,
502 CK_MECHANISM_TYPE type, void *param, SECKEYPublicKey **pubk, 502 CK_MECHANISM_TYPE type, void *param, SECKEYPublicKey **pubk,
503 PRBool isPerm, PRBool isSensitive, void *wincx); 503 PRBool isPerm, PRBool isSensitive, void *wincx);
504 SECKEYPrivateKey * PK11_FindPrivateKeyFromCert(PK11SlotInfo *slot, 504 SECKEYPrivateKey * PK11_FindPrivateKeyFromCert(PK11SlotInfo *slot,
505 CERTCertificate *cert, void *wincx); 505 CERTCertificate *cert, void *wincx);
506 SECKEYPrivateKey * PK11_FindKeyByAnyCert(CERTCertificate *cert, void *wincx); 506 SECKEYPrivateKey * PK11_FindKeyByAnyCert(CERTCertificate *cert, void *wincx);
507 SECKEYPrivateKey * PK11_FindKeyByKeyID(PK11SlotInfo *slot, SECItem *keyID, 507 SECKEYPrivateKey * PK11_FindKeyByKeyID(PK11SlotInfo *slot, SECItem *keyID,
508 void *wincx); 508 void *wincx);
509 int PK11_GetPrivateModulusLen(SECKEYPrivateKey *key); 509 int PK11_GetPrivateModulusLen(SECKEYPrivateKey *key);
510 510
511 SECStatus PK11_EncryptWithSymKey(PK11SymKey *symKey,
512 CK_MECHANISM_TYPE mechanism, SECItem *param,
513 unsigned char *out, unsigned int *outLen,
514 unsigned int maxLen,
515 const unsigned char *data, unsigned dataLen);
516 SECStatus PK11_DecryptWithSymKey(PK11SymKey *symkey,
517 CK_MECHANISM_TYPE mechanism, SECItem *param,
518 unsigned char *out, unsigned int *outLen,
519 unsigned int maxLen,
520 const unsigned char *enc, unsigned encLen);
521
511 /* note: despite the name, this function takes a private key. */ 522 /* note: despite the name, this function takes a private key. */
512 SECStatus PK11_PubDecryptRaw(SECKEYPrivateKey *key, unsigned char *data, 523 SECStatus PK11_PubDecryptRaw(SECKEYPrivateKey *key, unsigned char *data,
513 unsigned *outLen, unsigned int maxLen, unsigned char *enc, unsigned encLen); 524 unsigned *outLen, unsigned int maxLen, unsigned char *enc, unsigned encLen);
514 #define PK11_PrivDecryptRaw PK11_PubDecryptRaw 525 #define PK11_PrivDecryptRaw PK11_PubDecryptRaw
515 /* The encrypt function that complements the above decrypt function. */ 526 /* The encrypt function that complements the above decrypt function. */
516 SECStatus PK11_PubEncryptRaw(SECKEYPublicKey *key, unsigned char *enc, 527 SECStatus PK11_PubEncryptRaw(SECKEYPublicKey *key, unsigned char *enc,
517 unsigned char *data, unsigned dataLen, void *wincx); 528 unsigned char *data, unsigned dataLen, void *wincx);
518 529
519 SECStatus PK11_PrivDecryptPKCS1(SECKEYPrivateKey *key, unsigned char *data, 530 SECStatus PK11_PrivDecryptPKCS1(SECKEYPrivateKey *key, unsigned char *data,
520 unsigned *outLen, unsigned int maxLen, unsigned char *enc, unsigned encLen); 531 unsigned *outLen, unsigned int maxLen, unsigned char *enc, unsigned encLen);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 PK11_GetLowLevelKeyIDForCert(PK11SlotInfo *slot, 832 PK11_GetLowLevelKeyIDForCert(PK11SlotInfo *slot,
822 CERTCertificate *cert, void *pwarg); 833 CERTCertificate *cert, void *pwarg);
823 SECItem * 834 SECItem *
824 PK11_GetLowLevelKeyIDForPrivateKey(SECKEYPrivateKey *key); 835 PK11_GetLowLevelKeyIDForPrivateKey(SECKEYPrivateKey *key);
825 836
826 PRBool SECMOD_HasRootCerts(void); 837 PRBool SECMOD_HasRootCerts(void);
827 838
828 SEC_END_PROTOS 839 SEC_END_PROTOS
829 840
830 #endif 841 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698