pkcs12.h (1408B)
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 _PKCS12_H_ 6 #define _PKCS12_H_ 7 8 #include "pkcs12t.h" 9 #include "p12.h" 10 11 SEC_BEGIN_PROTOS 12 13 typedef SECItem *(*SEC_PKCS12GetPassword)(void *arg); 14 15 /* Decode functions */ 16 /* Import a PFX item. 17 * der_pfx is the der-encoded pfx item to import. 18 * pbef, and pbefarg are used to retrieve passwords for the HMAC, 19 * and any passwords needed for passing to PKCS5 encryption 20 * routines. 21 * algorithm is the algorithm by which private keys are stored in 22 * the key database. this could be a specific algorithm or could 23 * be based on a global setting. 24 * slot is the slot to where the certificates will be placed. if NULL, 25 * the internal key slot is used. 26 * If the process is successful, a SECSuccess is returned, otherwise 27 * a failure occurred. 28 */ 29 SECStatus 30 SEC_PKCS12PutPFX(SECItem *der_pfx, SECItem *pwitem, 31 SEC_PKCS12NicknameCollisionCallback ncCall, 32 PK11SlotInfo *slot, void *wincx); 33 34 /* check the first two bytes of a file to make sure that it matches 35 * the desired header for a PKCS 12 file 36 */ 37 PRBool SEC_PKCS12ValidData(char *buf, int bufLen, long int totalLength); 38 39 SEC_END_PROTOS 40 41 #endif