security/nss/lib/pkcs12/pkcs12.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial