OLD | NEW |
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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 PRBool token, PRBool sensitive); | 452 PRBool token, PRBool sensitive); |
453 char * PK11_GetSymKeyNickname(PK11SymKey *symKey); | 453 char * PK11_GetSymKeyNickname(PK11SymKey *symKey); |
454 char * PK11_GetPrivateKeyNickname(SECKEYPrivateKey *privKey); | 454 char * PK11_GetPrivateKeyNickname(SECKEYPrivateKey *privKey); |
455 char * PK11_GetPublicKeyNickname(SECKEYPublicKey *pubKey); | 455 char * PK11_GetPublicKeyNickname(SECKEYPublicKey *pubKey); |
456 SECStatus PK11_SetSymKeyNickname(PK11SymKey *symKey, const char *nickname); | 456 SECStatus PK11_SetSymKeyNickname(PK11SymKey *symKey, const char *nickname); |
457 SECStatus PK11_SetPrivateKeyNickname(SECKEYPrivateKey *privKey, | 457 SECStatus PK11_SetPrivateKeyNickname(SECKEYPrivateKey *privKey, |
458 const char *nickname); | 458 const char *nickname); |
459 SECStatus PK11_SetPublicKeyNickname(SECKEYPublicKey *pubKey, | 459 SECStatus PK11_SetPublicKeyNickname(SECKEYPublicKey *pubKey, |
460 const char *nickname); | 460 const char *nickname); |
461 | 461 |
| 462 /* |
| 463 * Using __PK11_SetCertificateNickname is *DANGEROUS*. |
| 464 * |
| 465 * The API will update the NSS database, but it *will NOT* update the in-memory
data. |
| 466 * As a result, after calling this API, there will be INCONSISTENCY between |
| 467 * in-memory data and the database. |
| 468 * |
| 469 * Use of the API should be limited to short-lived tools, which will exit immedi
ately |
| 470 * after using this API. |
| 471 * |
| 472 * If you ignore this warning, your process is TAINTED and will most likely misb
ehave. |
| 473 */ |
| 474 SECStatus __PK11_SetCertificateNickname(CERTCertificate *cert, |
| 475 const char *nickname); |
| 476 |
462 /* size to hold key in bytes */ | 477 /* size to hold key in bytes */ |
463 unsigned int PK11_GetKeyLength(PK11SymKey *key); | 478 unsigned int PK11_GetKeyLength(PK11SymKey *key); |
464 /* size of actual secret parts of key in bits */ | 479 /* size of actual secret parts of key in bits */ |
465 /* algid is because RC4 strength is determined by the effective bits as well | 480 /* algid is because RC4 strength is determined by the effective bits as well |
466 * as the key bits */ | 481 * as the key bits */ |
467 unsigned int PK11_GetKeyStrength(PK11SymKey *key,SECAlgorithmID *algid); | 482 unsigned int PK11_GetKeyStrength(PK11SymKey *key,SECAlgorithmID *algid); |
468 SECStatus PK11_ExtractKeyValue(PK11SymKey *symKey); | 483 SECStatus PK11_ExtractKeyValue(PK11SymKey *symKey); |
469 SECItem * PK11_GetKeyData(PK11SymKey *symKey); | 484 SECItem * PK11_GetKeyData(PK11SymKey *symKey); |
470 PK11SlotInfo * PK11_GetSlotFromKey(PK11SymKey *symKey); | 485 PK11SlotInfo * PK11_GetSlotFromKey(PK11SymKey *symKey); |
471 void *PK11_GetWindow(PK11SymKey *symKey); | 486 void *PK11_GetWindow(PK11SymKey *symKey); |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 PK11_GetLowLevelKeyIDForCert(PK11SlotInfo *slot, | 872 PK11_GetLowLevelKeyIDForCert(PK11SlotInfo *slot, |
858 CERTCertificate *cert, void *pwarg); | 873 CERTCertificate *cert, void *pwarg); |
859 SECItem * | 874 SECItem * |
860 PK11_GetLowLevelKeyIDForPrivateKey(SECKEYPrivateKey *key); | 875 PK11_GetLowLevelKeyIDForPrivateKey(SECKEYPrivateKey *key); |
861 | 876 |
862 PRBool SECMOD_HasRootCerts(void); | 877 PRBool SECMOD_HasRootCerts(void); |
863 | 878 |
864 SEC_END_PROTOS | 879 SEC_END_PROTOS |
865 | 880 |
866 #endif | 881 #endif |
OLD | NEW |