security/nss/lib/pkcs12/pkcs12.h

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5
michael@0 6 #ifndef _PKCS12_H_
michael@0 7 #define _PKCS12_H_
michael@0 8
michael@0 9 #include "pkcs12t.h"
michael@0 10 #include "p12.h"
michael@0 11
michael@0 12 SEC_BEGIN_PROTOS
michael@0 13
michael@0 14 typedef SECItem * (* SEC_PKCS12GetPassword)(void *arg);
michael@0 15
michael@0 16 /* Decode functions */
michael@0 17 /* Import a PFX item.
michael@0 18 * der_pfx is the der-encoded pfx item to import.
michael@0 19 * pbef, and pbefarg are used to retrieve passwords for the HMAC,
michael@0 20 * and any passwords needed for passing to PKCS5 encryption
michael@0 21 * routines.
michael@0 22 * algorithm is the algorithm by which private keys are stored in
michael@0 23 * the key database. this could be a specific algorithm or could
michael@0 24 * be based on a global setting.
michael@0 25 * slot is the slot to where the certificates will be placed. if NULL,
michael@0 26 * the internal key slot is used.
michael@0 27 * If the process is successful, a SECSuccess is returned, otherwise
michael@0 28 * a failure occurred.
michael@0 29 */
michael@0 30 SECStatus
michael@0 31 SEC_PKCS12PutPFX(SECItem *der_pfx, SECItem *pwitem,
michael@0 32 SEC_PKCS12NicknameCollisionCallback ncCall,
michael@0 33 PK11SlotInfo *slot, void *wincx);
michael@0 34
michael@0 35 /* check the first two bytes of a file to make sure that it matches
michael@0 36 * the desired header for a PKCS 12 file
michael@0 37 */
michael@0 38 PRBool SEC_PKCS12ValidData(char *buf, int bufLen, long int totalLength);
michael@0 39
michael@0 40 SEC_END_PROTOS
michael@0 41
michael@0 42 #endif

mercurial