security/nss/lib/pkcs12/p12local.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 _P12LOCAL_H_
michael@0 7 #define _P12LOCAL_H_
michael@0 8
michael@0 9 #include "plarena.h"
michael@0 10 #include "secoidt.h"
michael@0 11 #include "secasn1.h"
michael@0 12 #include "secder.h"
michael@0 13 #include "certt.h"
michael@0 14 #include "secpkcs7.h"
michael@0 15 #include "pkcs12.h"
michael@0 16 #include "p12.h"
michael@0 17
michael@0 18 /* helper functions */
michael@0 19 extern const SEC_ASN1Template *
michael@0 20 sec_pkcs12_choose_bag_type(void *src_or_dest, PRBool encoding);
michael@0 21 extern const SEC_ASN1Template *
michael@0 22 sec_pkcs12_choose_cert_crl_type(void *src_or_dest, PRBool encoding);
michael@0 23 extern const SEC_ASN1Template *
michael@0 24 sec_pkcs12_choose_shroud_type(void *src_or_dest, PRBool encoding);
michael@0 25 extern SECItem *sec_pkcs12_generate_salt(void);
michael@0 26 extern SECItem *sec_pkcs12_generate_key_from_password(SECOidTag algorithm,
michael@0 27 SECItem *salt, SECItem *password);
michael@0 28 extern SECItem *sec_pkcs12_generate_mac(SECItem *key, SECItem *msg,
michael@0 29 PRBool old_method);
michael@0 30 extern SGNDigestInfo *sec_pkcs12_compute_thumbprint(SECItem *der_cert);
michael@0 31 extern SECItem *sec_pkcs12_create_virtual_password(SECItem *password,
michael@0 32 SECItem *salt, PRBool swapUnicodeBytes);
michael@0 33 extern SECStatus sec_pkcs12_append_shrouded_key(SEC_PKCS12BaggageItem *bag,
michael@0 34 SEC_PKCS12ESPVKItem *espvk);
michael@0 35 extern void *sec_pkcs12_find_object(SEC_PKCS12SafeContents *safe,
michael@0 36 SEC_PKCS12Baggage *baggage, SECOidTag objType,
michael@0 37 SECItem *nickname, SGNDigestInfo *thumbprint);
michael@0 38 extern PRBool sec_pkcs12_convert_item_to_unicode(PLArenaPool *arena, SECItem *dest,
michael@0 39 SECItem *src, PRBool zeroTerm,
michael@0 40 PRBool asciiConvert, PRBool toUnicode);
michael@0 41 extern CK_MECHANISM_TYPE sec_pkcs12_algtag_to_mech(SECOidTag algtag);
michael@0 42
michael@0 43 /* create functions */
michael@0 44 extern SEC_PKCS12PFXItem *sec_pkcs12_new_pfx(void);
michael@0 45 extern SEC_PKCS12SafeContents *sec_pkcs12_create_safe_contents(
michael@0 46 PLArenaPool *poolp);
michael@0 47 extern SEC_PKCS12Baggage *sec_pkcs12_create_baggage(PLArenaPool *poolp);
michael@0 48 extern SEC_PKCS12BaggageItem *sec_pkcs12_create_external_bag(SEC_PKCS12Baggage *luggage);
michael@0 49 extern void SEC_PKCS12DestroyPFX(SEC_PKCS12PFXItem *pfx);
michael@0 50 extern SEC_PKCS12AuthenticatedSafe *sec_pkcs12_new_asafe(PLArenaPool *poolp);
michael@0 51
michael@0 52 /* conversion from old to new */
michael@0 53 extern SEC_PKCS12DecoderContext *
michael@0 54 sec_PKCS12ConvertOldSafeToNew(PLArenaPool *arena, PK11SlotInfo *slot,
michael@0 55 PRBool swapUnicode, SECItem *pwitem,
michael@0 56 void *wincx, SEC_PKCS12SafeContents *safe,
michael@0 57 SEC_PKCS12Baggage *baggage);
michael@0 58
michael@0 59 #endif

mercurial