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

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

Issue 14249009: Change the NSS and NSPR source tree to the new directory structure to be (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « mozilla/security/nss/lib/dev/ckhelper.c ('k') | mozilla/security/nss/lib/dev/devm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #ifndef DEV_H
6 #define DEV_H
7
8 /*
9 * dev.h
10 *
11 * Low-level methods for interaction with cryptoki devices
12 */
13
14 #ifdef DEBUG
15 static const char DEV_CVS_ID[] = "@(#) $RCSfile: dev.h,v $ $Revision: 1.43 $ $Da te: 2012/04/25 14:49:42 $";
16 #endif /* DEBUG */
17
18 #ifndef NSSDEV_H
19 #include "nssdev.h"
20 #endif /* NSSDEV_H */
21
22 #ifndef DEVT_H
23 #include "devt.h"
24 #endif /* DEVT_H */
25
26 PR_BEGIN_EXTERN_C
27
28 /* the global module list
29 *
30 * These functions are for managing the global set of modules. Trust Domains,
31 * etc., will draw from this set. These functions are completely internal
32 * and only invoked when there are changes to the global module state
33 * (load or unload).
34 *
35 * nss_InitializeGlobalModuleList
36 * nss_DestroyGlobalModuleList
37 * nss_GetLoadedModules
38 *
39 * nssGlobalModuleList_Add
40 * nssGlobalModuleList_Remove
41 * nssGlobalModuleList_FindModuleByName
42 * nssGlobalModuleList_FindSlotByName
43 * nssGlobalModuleList_FindTokenByName
44 */
45
46 NSS_EXTERN PRStatus
47 nss_InitializeGlobalModuleList
48 (
49 void
50 );
51
52 NSS_EXTERN PRStatus
53 nss_DestroyGlobalModuleList
54 (
55 void
56 );
57
58 NSS_EXTERN NSSModule **
59 nss_GetLoadedModules
60 (
61 void
62 );
63
64 NSS_EXTERN PRStatus
65 nssGlobalModuleList_Add
66 (
67 NSSModule *module
68 );
69
70 NSS_EXTERN PRStatus
71 nssGlobalModuleList_Remove
72 (
73 NSSModule *module
74 );
75
76 NSS_EXTERN NSSModule *
77 nssGlobalModuleList_FindModuleByName
78 (
79 NSSUTF8 *moduleName
80 );
81
82 NSS_EXTERN NSSSlot *
83 nssGlobalModuleList_FindSlotByName
84 (
85 NSSUTF8 *slotName
86 );
87
88 NSS_EXTERN NSSToken *
89 nssGlobalModuleList_FindTokenByName
90 (
91 NSSUTF8 *tokenName
92 );
93
94 NSS_EXTERN NSSToken *
95 nss_GetDefaultCryptoToken
96 (
97 void
98 );
99
100 NSS_EXTERN NSSToken *
101 nss_GetDefaultDatabaseToken
102 (
103 void
104 );
105
106 /*
107 * |-----------|<---> NSSSlot <--> NSSToken
108 * | NSSModule |<---> NSSSlot <--> NSSToken
109 * |-----------|<---> NSSSlot <--> NSSToken
110 */
111
112 /* NSSModule
113 *
114 * nssModule_Create
115 * nssModule_CreateFromSpec
116 * nssModule_AddRef
117 * nssModule_GetName
118 * nssModule_GetSlots
119 * nssModule_FindSlotByName
120 * nssModule_FindTokenByName
121 * nssModule_GetCertOrder
122 */
123
124 NSS_EXTERN NSSModule *
125 nssModule_Create
126 (
127 NSSUTF8 *moduleOpt,
128 NSSUTF8 *uriOpt,
129 NSSUTF8 *opaqueOpt,
130 void *reserved
131 );
132
133 /* This is to use the new loading mechanism. */
134 NSS_EXTERN NSSModule *
135 nssModule_CreateFromSpec
136 (
137 NSSUTF8 *moduleSpec,
138 NSSModule *parent,
139 PRBool loadSubModules
140 );
141
142 NSS_EXTERN PRStatus
143 nssModule_Destroy
144 (
145 NSSModule *mod
146 );
147
148 NSS_EXTERN NSSModule *
149 nssModule_AddRef
150 (
151 NSSModule *mod
152 );
153
154 NSS_EXTERN NSSUTF8 *
155 nssModule_GetName
156 (
157 NSSModule *mod
158 );
159
160 NSS_EXTERN NSSSlot **
161 nssModule_GetSlots
162 (
163 NSSModule *mod
164 );
165
166 NSS_EXTERN NSSSlot *
167 nssModule_FindSlotByName
168 (
169 NSSModule *mod,
170 NSSUTF8 *slotName
171 );
172
173 NSS_EXTERN NSSToken *
174 nssModule_FindTokenByName
175 (
176 NSSModule *mod,
177 NSSUTF8 *tokenName
178 );
179
180 NSS_EXTERN PRInt32
181 nssModule_GetCertOrder
182 (
183 NSSModule *module
184 );
185
186 /* NSSSlot
187 *
188 * nssSlot_Destroy
189 * nssSlot_AddRef
190 * nssSlot_GetName
191 * nssSlot_GetTokenName
192 * nssSlot_IsTokenPresent
193 * nssSlot_IsPermanent
194 * nssSlot_IsFriendly
195 * nssSlot_IsHardware
196 * nssSlot_Refresh
197 * nssSlot_GetModule
198 * nssSlot_GetToken
199 * nssSlot_Login
200 * nssSlot_Logout
201 * nssSlot_SetPassword
202 * nssSlot_CreateSession
203 */
204
205 NSS_EXTERN PRStatus
206 nssSlot_Destroy
207 (
208 NSSSlot *slot
209 );
210
211 NSS_EXTERN NSSSlot *
212 nssSlot_AddRef
213 (
214 NSSSlot *slot
215 );
216
217 NSS_EXTERN void
218 nssSlot_ResetDelay
219 (
220 NSSSlot *slot
221 );
222
223 NSS_EXTERN NSSUTF8 *
224 nssSlot_GetName
225 (
226 NSSSlot *slot
227 );
228
229 NSS_EXTERN NSSUTF8 *
230 nssSlot_GetTokenName
231 (
232 NSSSlot *slot
233 );
234
235 NSS_EXTERN NSSModule *
236 nssSlot_GetModule
237 (
238 NSSSlot *slot
239 );
240
241 NSS_EXTERN NSSToken *
242 nssSlot_GetToken
243 (
244 NSSSlot *slot
245 );
246
247 NSS_EXTERN PRBool
248 nssSlot_IsTokenPresent
249 (
250 NSSSlot *slot
251 );
252
253 NSS_EXTERN PRBool
254 nssSlot_IsPermanent
255 (
256 NSSSlot *slot
257 );
258
259 NSS_EXTERN PRBool
260 nssSlot_IsFriendly
261 (
262 NSSSlot *slot
263 );
264
265 NSS_EXTERN PRBool
266 nssSlot_IsHardware
267 (
268 NSSSlot *slot
269 );
270
271 NSS_EXTERN PRBool
272 nssSlot_IsLoggedIn
273 (
274 NSSSlot *slot
275 );
276
277 NSS_EXTERN PRStatus
278 nssSlot_Refresh
279 (
280 NSSSlot *slot
281 );
282
283 NSS_EXTERN PRStatus
284 nssSlot_Login
285 (
286 NSSSlot *slot,
287 NSSCallback *pwcb
288 );
289 extern const NSSError NSS_ERROR_INVALID_PASSWORD;
290 extern const NSSError NSS_ERROR_USER_CANCELED;
291
292 NSS_EXTERN PRStatus
293 nssSlot_Logout
294 (
295 NSSSlot *slot,
296 nssSession *sessionOpt
297 );
298
299 NSS_EXTERN void
300 nssSlot_EnterMonitor
301 (
302 NSSSlot *slot
303 );
304
305 NSS_EXTERN void
306 nssSlot_ExitMonitor
307 (
308 NSSSlot *slot
309 );
310
311 #define NSSSLOT_ASK_PASSWORD_FIRST_TIME -1
312 #define NSSSLOT_ASK_PASSWORD_EVERY_TIME 0
313 NSS_EXTERN void
314 nssSlot_SetPasswordDefaults
315 (
316 NSSSlot *slot,
317 PRInt32 askPasswordTimeout
318 );
319
320 NSS_EXTERN PRStatus
321 nssSlot_SetPassword
322 (
323 NSSSlot *slot,
324 NSSUTF8 *oldPasswordOpt,
325 NSSUTF8 *newPassword
326 );
327 extern const NSSError NSS_ERROR_INVALID_PASSWORD;
328 extern const NSSError NSS_ERROR_USER_CANCELED;
329
330 /*
331 * nssSlot_IsLoggedIn
332 */
333
334 NSS_EXTERN nssSession *
335 nssSlot_CreateSession
336 (
337 NSSSlot *slot,
338 NSSArena *arenaOpt,
339 PRBool readWrite /* so far, this is the only flag used */
340 );
341
342 /* NSSToken
343 *
344 * nssToken_Destroy
345 * nssToken_AddRef
346 * nssToken_GetName
347 * nssToken_GetModule
348 * nssToken_GetSlot
349 * nssToken_NeedsPINInitialization
350 * nssToken_ImportCertificate
351 * nssToken_ImportTrust
352 * nssToken_ImportCRL
353 * nssToken_GenerateKeyPair
354 * nssToken_GenerateSymmetricKey
355 * nssToken_DeleteStoredObject
356 * nssToken_FindObjects
357 * nssToken_FindCertificatesBySubject
358 * nssToken_FindCertificatesByNickname
359 * nssToken_FindCertificatesByEmail
360 * nssToken_FindCertificateByIssuerAndSerialNumber
361 * nssToken_FindCertificateByEncodedCertificate
362 * nssToken_FindTrustForCertificate
363 * nssToken_FindCRLsBySubject
364 * nssToken_FindPrivateKeys
365 * nssToken_FindPrivateKeyByID
366 * nssToken_Digest
367 * nssToken_BeginDigest
368 * nssToken_ContinueDigest
369 * nssToken_FinishDigest
370 */
371
372 NSS_EXTERN PRStatus
373 nssToken_Destroy
374 (
375 NSSToken *tok
376 );
377
378 NSS_EXTERN NSSToken *
379 nssToken_AddRef
380 (
381 NSSToken *tok
382 );
383
384 NSS_EXTERN NSSUTF8 *
385 nssToken_GetName
386 (
387 NSSToken *tok
388 );
389
390 NSS_EXTERN NSSModule *
391 nssToken_GetModule
392 (
393 NSSToken *token
394 );
395
396 NSS_EXTERN NSSSlot *
397 nssToken_GetSlot
398 (
399 NSSToken *tok
400 );
401
402 NSS_EXTERN PRBool
403 nssToken_NeedsPINInitialization
404 (
405 NSSToken *token
406 );
407
408 NSS_EXTERN nssCryptokiObject *
409 nssToken_ImportCertificate
410 (
411 NSSToken *tok,
412 nssSession *sessionOpt,
413 NSSCertificateType certType,
414 NSSItem *id,
415 const NSSUTF8 *nickname,
416 NSSDER *encoding,
417 NSSDER *issuer,
418 NSSDER *subject,
419 NSSDER *serial,
420 NSSASCII7 *emailAddr,
421 PRBool asTokenObject
422 );
423
424 NSS_EXTERN nssCryptokiObject *
425 nssToken_ImportTrust
426 (
427 NSSToken *tok,
428 nssSession *sessionOpt,
429 NSSDER *certEncoding,
430 NSSDER *certIssuer,
431 NSSDER *certSerial,
432 nssTrustLevel serverAuth,
433 nssTrustLevel clientAuth,
434 nssTrustLevel codeSigning,
435 nssTrustLevel emailProtection,
436 PRBool stepUpApproved,
437 PRBool asTokenObject
438 );
439
440 NSS_EXTERN nssCryptokiObject *
441 nssToken_ImportCRL
442 (
443 NSSToken *token,
444 nssSession *sessionOpt,
445 NSSDER *subject,
446 NSSDER *encoding,
447 PRBool isKRL,
448 NSSUTF8 *url,
449 PRBool asTokenObject
450 );
451
452 /* Permanently remove an object from the token. */
453 NSS_EXTERN PRStatus
454 nssToken_DeleteStoredObject
455 (
456 nssCryptokiObject *instance
457 );
458
459 NSS_EXTERN nssCryptokiObject **
460 nssToken_FindObjects
461 (
462 NSSToken *token,
463 nssSession *sessionOpt,
464 CK_OBJECT_CLASS objclass,
465 nssTokenSearchType searchType,
466 PRUint32 maximumOpt,
467 PRStatus *statusOpt
468 );
469
470 NSS_EXTERN nssCryptokiObject **
471 nssToken_FindCertificatesBySubject
472 (
473 NSSToken *token,
474 nssSession *sessionOpt,
475 NSSDER *subject,
476 nssTokenSearchType searchType,
477 PRUint32 maximumOpt,
478 PRStatus *statusOpt
479 );
480
481 NSS_EXTERN nssCryptokiObject **
482 nssToken_FindCertificatesByNickname
483 (
484 NSSToken *token,
485 nssSession *sessionOpt,
486 const NSSUTF8 *name,
487 nssTokenSearchType searchType,
488 PRUint32 maximumOpt,
489 PRStatus *statusOpt
490 );
491
492 NSS_EXTERN nssCryptokiObject **
493 nssToken_FindCertificatesByEmail
494 (
495 NSSToken *token,
496 nssSession *sessionOpt,
497 NSSASCII7 *email,
498 nssTokenSearchType searchType,
499 PRUint32 maximumOpt,
500 PRStatus *statusOpt
501 );
502
503 NSS_EXTERN nssCryptokiObject **
504 nssToken_FindCertificatesByID
505 (
506 NSSToken *token,
507 nssSession *sessionOpt,
508 NSSItem *id,
509 nssTokenSearchType searchType,
510 PRUint32 maximumOpt,
511 PRStatus *statusOpt
512 );
513
514 NSS_EXTERN nssCryptokiObject *
515 nssToken_FindCertificateByIssuerAndSerialNumber
516 (
517 NSSToken *token,
518 nssSession *sessionOpt,
519 NSSDER *issuer,
520 NSSDER *serial,
521 nssTokenSearchType searchType,
522 PRStatus *statusOpt
523 );
524
525 NSS_EXTERN nssCryptokiObject *
526 nssToken_FindCertificateByEncodedCertificate
527 (
528 NSSToken *token,
529 nssSession *sessionOpt,
530 NSSBER *encodedCertificate,
531 nssTokenSearchType searchType,
532 PRStatus *statusOpt
533 );
534
535 NSS_EXTERN nssCryptokiObject *
536 nssToken_FindTrustForCertificate
537 (
538 NSSToken *token,
539 nssSession *sessionOpt,
540 NSSDER *certEncoding,
541 NSSDER *certIssuer,
542 NSSDER *certSerial,
543 nssTokenSearchType searchType
544 );
545
546 NSS_EXTERN nssCryptokiObject **
547 nssToken_FindCRLsBySubject
548 (
549 NSSToken *token,
550 nssSession *sessionOpt,
551 NSSDER *subject,
552 nssTokenSearchType searchType,
553 PRUint32 maximumOpt,
554 PRStatus *statusOpt
555 );
556
557 NSS_EXTERN nssCryptokiObject **
558 nssToken_FindPrivateKeys
559 (
560 NSSToken *token,
561 nssSession *sessionOpt,
562 nssTokenSearchType searchType,
563 PRUint32 maximumOpt,
564 PRStatus *statusOpt
565 );
566
567 NSS_EXTERN nssCryptokiObject *
568 nssToken_FindPrivateKeyByID
569 (
570 NSSToken *token,
571 nssSession *sessionOpt,
572 NSSItem *keyID
573 );
574
575 NSS_EXTERN nssCryptokiObject *
576 nssToken_FindPublicKeyByID
577 (
578 NSSToken *token,
579 nssSession *sessionOpt,
580 NSSItem *keyID
581 );
582
583 NSS_EXTERN NSSItem *
584 nssToken_Digest
585 (
586 NSSToken *tok,
587 nssSession *sessionOpt,
588 NSSAlgorithmAndParameters *ap,
589 NSSItem *data,
590 NSSItem *rvOpt,
591 NSSArena *arenaOpt
592 );
593
594 NSS_EXTERN PRStatus
595 nssToken_BeginDigest
596 (
597 NSSToken *tok,
598 nssSession *sessionOpt,
599 NSSAlgorithmAndParameters *ap
600 );
601
602 NSS_EXTERN PRStatus
603 nssToken_ContinueDigest
604 (
605 NSSToken *tok,
606 nssSession *sessionOpt,
607 NSSItem *item
608 );
609
610 NSS_EXTERN NSSItem *
611 nssToken_FinishDigest
612 (
613 NSSToken *tok,
614 nssSession *sessionOpt,
615 NSSItem *rvOpt,
616 NSSArena *arenaOpt
617 );
618
619 /* nssSession
620 *
621 * nssSession_Destroy
622 * nssSession_EnterMonitor
623 * nssSession_ExitMonitor
624 * nssSession_IsReadWrite
625 */
626
627 NSS_EXTERN PRStatus
628 nssSession_Destroy
629 (
630 nssSession *s
631 );
632
633 /* would like to inline */
634 NSS_EXTERN PRStatus
635 nssSession_EnterMonitor
636 (
637 nssSession *s
638 );
639
640 /* would like to inline */
641 NSS_EXTERN PRStatus
642 nssSession_ExitMonitor
643 (
644 nssSession *s
645 );
646
647 /* would like to inline */
648 NSS_EXTERN PRBool
649 nssSession_IsReadWrite
650 (
651 nssSession *s
652 );
653
654 /* nssCryptokiObject
655 *
656 * An object living on a cryptoki token.
657 * Not really proper to mix up the object types just because
658 * nssCryptokiObject itself is generic, but doing so anyway.
659 *
660 * nssCryptokiObject_Destroy
661 * nssCryptokiObject_Equal
662 * nssCryptokiObject_Clone
663 * nssCryptokiCertificate_GetAttributes
664 * nssCryptokiPrivateKey_GetAttributes
665 * nssCryptokiPublicKey_GetAttributes
666 * nssCryptokiTrust_GetAttributes
667 * nssCryptokiCRL_GetAttributes
668 */
669
670 NSS_EXTERN void
671 nssCryptokiObject_Destroy
672 (
673 nssCryptokiObject *object
674 );
675
676 NSS_EXTERN PRBool
677 nssCryptokiObject_Equal
678 (
679 nssCryptokiObject *object1,
680 nssCryptokiObject *object2
681 );
682
683 NSS_EXTERN nssCryptokiObject *
684 nssCryptokiObject_Clone
685 (
686 nssCryptokiObject *object
687 );
688
689 NSS_EXTERN PRStatus
690 nssCryptokiCertificate_GetAttributes
691 (
692 nssCryptokiObject *object,
693 nssSession *sessionOpt,
694 NSSArena *arenaOpt,
695 NSSCertificateType *certTypeOpt,
696 NSSItem *idOpt,
697 NSSDER *encodingOpt,
698 NSSDER *issuerOpt,
699 NSSDER *serialOpt,
700 NSSDER *subjectOpt
701 );
702
703 NSS_EXTERN PRStatus
704 nssCryptokiTrust_GetAttributes
705 (
706 nssCryptokiObject *trustObject,
707 nssSession *sessionOpt,
708 NSSItem *sha1_hash,
709 nssTrustLevel *serverAuth,
710 nssTrustLevel *clientAuth,
711 nssTrustLevel *codeSigning,
712 nssTrustLevel *emailProtection,
713 PRBool *stepUpApproved
714 );
715
716 NSS_EXTERN PRStatus
717 nssCryptokiCRL_GetAttributes
718 (
719 nssCryptokiObject *crlObject,
720 nssSession *sessionOpt,
721 NSSArena *arenaOpt,
722 NSSItem *encodingOpt,
723 NSSItem * subjectOpt,
724 CK_ULONG * crl_class,
725 NSSUTF8 **urlOpt,
726 PRBool *isKRLOpt
727 );
728
729 /* I'm including this to handle import of certificates in NSS 3.5. This
730 * function will set the cert-related attributes of a key, in order to
731 * associate it with a cert. Does it stay like this for 4.0?
732 */
733 NSS_EXTERN PRStatus
734 nssCryptokiPrivateKey_SetCertificate
735 (
736 nssCryptokiObject *keyObject,
737 nssSession *sessionOpt,
738 const NSSUTF8 *nickname,
739 NSSItem *id,
740 NSSDER *subject
741 );
742
743 NSS_EXTERN void
744 nssModuleArray_Destroy
745 (
746 NSSModule **modules
747 );
748
749 /* nssSlotArray
750 *
751 * nssSlotArray_Destroy
752 */
753
754 NSS_EXTERN void
755 nssSlotArray_Destroy
756 (
757 NSSSlot **slots
758 );
759
760 /* nssTokenArray
761 *
762 * nssTokenArray_Destroy
763 */
764
765 NSS_EXTERN void
766 nssTokenArray_Destroy
767 (
768 NSSToken **tokens
769 );
770
771 /* nssCryptokiObjectArray
772 *
773 * nssCryptokiObjectArray_Destroy
774 */
775 NSS_EXTERN void
776 nssCryptokiObjectArray_Destroy
777 (
778 nssCryptokiObject **object
779 );
780
781 /* nssSlotList
782 *
783 * An ordered list of slots. The order can be anything, it is set in the
784 * Add methods. Perhaps it should be CreateInCertOrder, ...?
785 *
786 * nssSlotList_Create
787 * nssSlotList_Destroy
788 * nssSlotList_Add
789 * nssSlotList_AddModuleSlots
790 * nssSlotList_GetSlots
791 * nssSlotList_FindSlotByName
792 * nssSlotList_FindTokenByName
793 * nssSlotList_GetBestSlot
794 * nssSlotList_GetBestSlotForAlgorithmAndParameters
795 * nssSlotList_GetBestSlotForAlgorithmsAndParameters
796 */
797
798 /* nssSlotList_Create
799 */
800 NSS_EXTERN nssSlotList *
801 nssSlotList_Create
802 (
803 NSSArena *arenaOpt
804 );
805
806 /* nssSlotList_Destroy
807 */
808 NSS_EXTERN void
809 nssSlotList_Destroy
810 (
811 nssSlotList *slotList
812 );
813
814 /* nssSlotList_Add
815 *
816 * Add the given slot in the given order.
817 */
818 NSS_EXTERN PRStatus
819 nssSlotList_Add
820 (
821 nssSlotList *slotList,
822 NSSSlot *slot,
823 PRUint32 order
824 );
825
826 /* nssSlotList_AddModuleSlots
827 *
828 * Add all slots in the module, in the given order (the slots will have
829 * equal weight).
830 */
831 NSS_EXTERN PRStatus
832 nssSlotList_AddModuleSlots
833 (
834 nssSlotList *slotList,
835 NSSModule *module,
836 PRUint32 order
837 );
838
839 /* nssSlotList_GetSlots
840 */
841 NSS_EXTERN NSSSlot **
842 nssSlotList_GetSlots
843 (
844 nssSlotList *slotList
845 );
846
847 /* nssSlotList_FindSlotByName
848 */
849 NSS_EXTERN NSSSlot *
850 nssSlotList_FindSlotByName
851 (
852 nssSlotList *slotList,
853 NSSUTF8 *slotName
854 );
855
856 /* nssSlotList_FindTokenByName
857 */
858 NSS_EXTERN NSSToken *
859 nssSlotList_FindTokenByName
860 (
861 nssSlotList *slotList,
862 NSSUTF8 *tokenName
863 );
864
865 /* nssSlotList_GetBestSlot
866 *
867 * The best slot is the highest ranking in order, i.e., the first in the
868 * list.
869 */
870 NSS_EXTERN NSSSlot *
871 nssSlotList_GetBestSlot
872 (
873 nssSlotList *slotList
874 );
875
876 /* nssSlotList_GetBestSlotForAlgorithmAndParameters
877 *
878 * Highest-ranking slot than can handle algorithm/parameters.
879 */
880 NSS_EXTERN NSSSlot *
881 nssSlotList_GetBestSlotForAlgorithmAndParameters
882 (
883 nssSlotList *slotList,
884 NSSAlgorithmAndParameters *ap
885 );
886
887 /* nssSlotList_GetBestSlotForAlgorithmsAndParameters
888 *
889 * Highest-ranking slot than can handle all algorithms/parameters.
890 */
891 NSS_EXTERN NSSSlot *
892 nssSlotList_GetBestSlotForAlgorithmsAndParameters
893 (
894 nssSlotList *slotList,
895 NSSAlgorithmAndParameters **ap
896 );
897
898 NSS_EXTERN PRBool
899 nssToken_IsPresent
900 (
901 NSSToken *token
902 );
903
904 NSS_EXTERN nssSession *
905 nssToken_GetDefaultSession
906 (
907 NSSToken *token
908 );
909
910 NSS_EXTERN PRStatus
911 nssToken_GetTrustOrder
912 (
913 NSSToken *tok
914 );
915
916 NSS_EXTERN PRStatus
917 nssToken_NotifyCertsNotVisible
918 (
919 NSSToken *tok
920 );
921
922 NSS_EXTERN PRStatus
923 nssToken_TraverseCertificates
924 (
925 NSSToken *token,
926 nssSession *sessionOpt,
927 nssTokenSearchType searchType,
928 PRStatus (* callback)(nssCryptokiObject *instance, void *arg),
929 void *arg
930 );
931
932 NSS_EXTERN PRBool
933 nssToken_IsPrivateKeyAvailable
934 (
935 NSSToken *token,
936 NSSCertificate *c,
937 nssCryptokiObject *instance
938 );
939
940 PR_END_EXTERN_C
941
942 #endif /* DEV_H */
OLDNEW
« no previous file with comments | « mozilla/security/nss/lib/dev/ckhelper.c ('k') | mozilla/security/nss/lib/dev/devm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698