security/nss/lib/ckfw/builtins/builtins.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/ckfw/builtins/builtins.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,72 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nssckmdt.h"
     1.9 +#include "nssckfw.h"
    1.10 +
    1.11 +/*
    1.12 + * I'm including this for access to the arena functions.
    1.13 + * Looks like we should publish that API.
    1.14 + */
    1.15 +#ifndef BASE_H
    1.16 +#include "base.h"
    1.17 +#endif /* BASE_H */
    1.18 +
    1.19 +/*
    1.20 + * This is where the Netscape extensions live, at least for now.
    1.21 + */
    1.22 +#ifndef CKT_H
    1.23 +#include "ckt.h"
    1.24 +#endif /* CKT_H */
    1.25 +
    1.26 +struct builtinsInternalObjectStr {
    1.27 +  CK_ULONG n;
    1.28 +  const CK_ATTRIBUTE_TYPE *types;
    1.29 +  const NSSItem *items;
    1.30 +  NSSCKMDObject mdObject;
    1.31 +};
    1.32 +typedef struct builtinsInternalObjectStr builtinsInternalObject;
    1.33 +
    1.34 +extern       builtinsInternalObject nss_builtins_data[];
    1.35 +extern const PRUint32               nss_builtins_nObjects;
    1.36 +
    1.37 +extern const CK_VERSION   nss_builtins_CryptokiVersion;
    1.38 +extern const CK_VERSION   nss_builtins_LibraryVersion;
    1.39 +extern const CK_VERSION   nss_builtins_HardwareVersion;
    1.40 +extern const CK_VERSION   nss_builtins_FirmwareVersion;
    1.41 +
    1.42 +extern const NSSUTF8      nss_builtins_ManufacturerID[];
    1.43 +extern const NSSUTF8      nss_builtins_LibraryDescription[];
    1.44 +extern const NSSUTF8      nss_builtins_SlotDescription[];
    1.45 +extern const NSSUTF8      nss_builtins_TokenLabel[];
    1.46 +extern const NSSUTF8      nss_builtins_TokenModel[];
    1.47 +extern const NSSUTF8      nss_builtins_TokenSerialNumber[];
    1.48 +
    1.49 +extern const NSSCKMDInstance nss_builtins_mdInstance;
    1.50 +extern const NSSCKMDSlot     nss_builtins_mdSlot;
    1.51 +extern const NSSCKMDToken    nss_builtins_mdToken;
    1.52 +
    1.53 +NSS_EXTERN NSSCKMDSession *
    1.54 +nss_builtins_CreateSession
    1.55 +(
    1.56 +  NSSCKFWSession *fwSession,
    1.57 +  CK_RV *pError
    1.58 +);
    1.59 +
    1.60 +NSS_EXTERN NSSCKMDFindObjects *
    1.61 +nss_builtins_FindObjectsInit
    1.62 +(
    1.63 +  NSSCKFWSession *fwSession,
    1.64 +  CK_ATTRIBUTE_PTR pTemplate,
    1.65 +  CK_ULONG ulAttributeCount,
    1.66 +  CK_RV *pError
    1.67 +);
    1.68 +
    1.69 +NSS_EXTERN NSSCKMDObject *
    1.70 +nss_builtins_CreateMDObject
    1.71 +(
    1.72 +  NSSArena *arena,
    1.73 +  builtinsInternalObject *io,
    1.74 +  CK_RV *pError
    1.75 +);

mercurial