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

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

Issue 295043002: Add RSA-OAEP support from upstream NSS bugs 1009794 and 1009785 (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 6 years, 7 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 unsigned char *out, unsigned int *outLen, 513 unsigned char *out, unsigned int *outLen,
514 unsigned int maxLen, 514 unsigned int maxLen,
515 const unsigned char *enc, unsigned int encLen); 515 const unsigned char *enc, unsigned int encLen);
516 SECStatus PK11_Encrypt(PK11SymKey *symKey, 516 SECStatus PK11_Encrypt(PK11SymKey *symKey,
517 CK_MECHANISM_TYPE mechanism, SECItem *param, 517 CK_MECHANISM_TYPE mechanism, SECItem *param,
518 unsigned char *out, unsigned int *outLen, 518 unsigned char *out, unsigned int *outLen,
519 unsigned int maxLen, 519 unsigned int maxLen,
520 const unsigned char *data, unsigned int dataLen); 520 const unsigned char *data, unsigned int dataLen);
521 521
522 /* note: despite the name, this function takes a private key. */ 522 /* note: despite the name, this function takes a private key. */
523 SECStatus PK11_PubDecryptRaw(SECKEYPrivateKey *key, unsigned char *data, 523 SECStatus PK11_PubDecryptRaw(SECKEYPrivateKey *key,
524 unsigned *outLen, unsigned int maxLen, unsigned char *enc, unsigned encLen); 524 unsigned char *data, unsigned *outLen,
525 unsigned int maxLen,
526 const unsigned char *enc, unsigned encLen);
525 #define PK11_PrivDecryptRaw PK11_PubDecryptRaw 527 #define PK11_PrivDecryptRaw PK11_PubDecryptRaw
526 /* The encrypt function that complements the above decrypt function. */ 528 /* The encrypt function that complements the above decrypt function. */
527 SECStatus PK11_PubEncryptRaw(SECKEYPublicKey *key, unsigned char *enc, 529 SECStatus PK11_PubEncryptRaw(SECKEYPublicKey *key,
528 unsigned char *data, unsigned dataLen, void *wincx); 530 unsigned char *enc,
531 const unsigned char *data, unsigned dataLen,
532 void *wincx);
529 533
530 SECStatus PK11_PrivDecryptPKCS1(SECKEYPrivateKey *key, unsigned char *data, 534 SECStatus PK11_PrivDecryptPKCS1(SECKEYPrivateKey *key,
531 unsigned *outLen, unsigned int maxLen, unsigned char *enc, unsigned encLen); 535 unsigned char *data, unsigned *outLen,
536 unsigned int maxLen,
537 const unsigned char *enc, unsigned encLen);
532 /* The encrypt function that complements the above decrypt function. */ 538 /* The encrypt function that complements the above decrypt function. */
533 SECStatus PK11_PubEncryptPKCS1(SECKEYPublicKey *key, unsigned char *enc, 539 SECStatus PK11_PubEncryptPKCS1(SECKEYPublicKey *key,
534 unsigned char *data, unsigned dataLen, void *wincx); 540 unsigned char *enc,
541 const unsigned char *data, unsigned dataLen,
542 void *wincx);
543
544 SECStatus PK11_PrivDecrypt(SECKEYPrivateKey *key,
545 CK_MECHANISM_TYPE mechanism, SECItem *param,
546 unsigned char *out, unsigned int *outLen,
547 unsigned int maxLen,
548 const unsigned char *enc, unsigned int encLen);
549 SECStatus PK11_PubEncrypt(SECKEYPublicKey *key,
550 CK_MECHANISM_TYPE mechanism, SECItem *param,
551 unsigned char *out, unsigned int *outLen,
552 unsigned int maxLen,
553 const unsigned char *data, unsigned int dataLen,
554 void *wincx);
535 555
536 SECStatus PK11_ImportPrivateKeyInfo(PK11SlotInfo *slot, 556 SECStatus PK11_ImportPrivateKeyInfo(PK11SlotInfo *slot,
537 SECKEYPrivateKeyInfo *pki, SECItem *nickname, 557 SECKEYPrivateKeyInfo *pki, SECItem *nickname,
538 SECItem *publicValue, PRBool isPerm, PRBool isPrivate, 558 SECItem *publicValue, PRBool isPerm, PRBool isPrivate,
539 unsigned int usage, void *wincx); 559 unsigned int usage, void *wincx);
540 SECStatus PK11_ImportPrivateKeyInfoAndReturnKey(PK11SlotInfo *slot, 560 SECStatus PK11_ImportPrivateKeyInfoAndReturnKey(PK11SlotInfo *slot,
541 SECKEYPrivateKeyInfo *pki, SECItem *nickname, 561 SECKEYPrivateKeyInfo *pki, SECItem *nickname,
542 SECItem *publicValue, PRBool isPerm, PRBool isPrivate, 562 SECItem *publicValue, PRBool isPerm, PRBool isPrivate,
543 unsigned int usage, SECKEYPrivateKey** privk, void *wincx); 563 unsigned int usage, SECKEYPrivateKey** privk, void *wincx);
544 SECStatus PK11_ImportDERPrivateKeyInfo(PK11SlotInfo *slot, 564 SECStatus PK11_ImportDERPrivateKeyInfo(PK11SlotInfo *slot,
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 PK11_GetLowLevelKeyIDForCert(PK11SlotInfo *slot, 857 PK11_GetLowLevelKeyIDForCert(PK11SlotInfo *slot,
838 CERTCertificate *cert, void *pwarg); 858 CERTCertificate *cert, void *pwarg);
839 SECItem * 859 SECItem *
840 PK11_GetLowLevelKeyIDForPrivateKey(SECKEYPrivateKey *key); 860 PK11_GetLowLevelKeyIDForPrivateKey(SECKEYPrivateKey *key);
841 861
842 PRBool SECMOD_HasRootCerts(void); 862 PRBool SECMOD_HasRootCerts(void);
843 863
844 SEC_END_PROTOS 864 SEC_END_PROTOS
845 865
846 #endif 866 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698