~ubuntu-branches/ubuntu/precise/nss/precise-security

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/ckfw/nssmkey/mslot.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-11-14 14:58:07 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20131114145807-ay302kimn72ovt88
Tags: 3.15.3-0ubuntu0.12.04.1
* SECURITY UPDATE: New upstream release to fix multiple security issues
  and add TLSv1.2 support.
  - CVE-2013-1739
  - CVE-2013-1741
  - CVE-2013-5605
  - CVE-2013-5606
* Adjusted packaging for 3.15.3:
  - debian/patches/*: refreshed.
  - debian/patches/lower-dhe-priority.patch: removed, no longer needed,
    was a workaround for an old version of firefox.
  - debian/libnss3.symbols: added new symbols.
  - debian/rules: updated for new source layout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
#ifdef DEBUG
6
 
static const char CVS_ID[] = "@(#) $RCSfile: mslot.c,v $ $Revision: 1.2 $ $Date: 2012/04/25 14:49:40 $";
7
 
#endif /* DEBUG */
8
 
 
9
 
#include "ckmk.h"
10
 
 
11
 
/*
12
 
 * nssmkey/mslot.c
13
 
 *
14
 
 * This file implements the NSSCKMDSlot object for the
15
 
 * "nssmkey" cryptoki module.
16
 
 */
17
 
 
18
 
static NSSUTF8 *
19
 
ckmk_mdSlot_GetSlotDescription
20
 
(
21
 
  NSSCKMDSlot *mdSlot,
22
 
  NSSCKFWSlot *fwSlot,
23
 
  NSSCKMDInstance *mdInstance,
24
 
  NSSCKFWInstance *fwInstance,
25
 
  CK_RV *pError
26
 
)
27
 
{
28
 
  return (NSSUTF8 *)nss_ckmk_SlotDescription;
29
 
}
30
 
 
31
 
static NSSUTF8 *
32
 
ckmk_mdSlot_GetManufacturerID
33
 
(
34
 
  NSSCKMDSlot *mdSlot,
35
 
  NSSCKFWSlot *fwSlot,
36
 
  NSSCKMDInstance *mdInstance,
37
 
  NSSCKFWInstance *fwInstance,
38
 
  CK_RV *pError
39
 
)
40
 
{
41
 
  return (NSSUTF8 *)nss_ckmk_ManufacturerID;
42
 
}
43
 
 
44
 
static CK_VERSION
45
 
ckmk_mdSlot_GetHardwareVersion
46
 
(
47
 
  NSSCKMDSlot *mdSlot,
48
 
  NSSCKFWSlot *fwSlot,
49
 
  NSSCKMDInstance *mdInstance,
50
 
  NSSCKFWInstance *fwInstance
51
 
)
52
 
{
53
 
  return nss_ckmk_HardwareVersion;
54
 
}
55
 
 
56
 
static CK_VERSION
57
 
ckmk_mdSlot_GetFirmwareVersion
58
 
(
59
 
  NSSCKMDSlot *mdSlot,
60
 
  NSSCKFWSlot *fwSlot,
61
 
  NSSCKMDInstance *mdInstance,
62
 
  NSSCKFWInstance *fwInstance
63
 
)
64
 
{
65
 
  return nss_ckmk_FirmwareVersion;
66
 
}
67
 
 
68
 
static NSSCKMDToken *
69
 
ckmk_mdSlot_GetToken
70
 
(
71
 
  NSSCKMDSlot *mdSlot,
72
 
  NSSCKFWSlot *fwSlot,
73
 
  NSSCKMDInstance *mdInstance,
74
 
  NSSCKFWInstance *fwInstance,
75
 
  CK_RV *pError
76
 
)
77
 
{
78
 
  return (NSSCKMDToken *)&nss_ckmk_mdToken;
79
 
}
80
 
 
81
 
NSS_IMPLEMENT_DATA const NSSCKMDSlot
82
 
nss_ckmk_mdSlot = {
83
 
  (void *)NULL, /* etc */
84
 
  NULL, /* Initialize */
85
 
  NULL, /* Destroy */
86
 
  ckmk_mdSlot_GetSlotDescription,
87
 
  ckmk_mdSlot_GetManufacturerID,
88
 
  NULL, /* GetTokenPresent -- defaults to true */
89
 
  NULL, /* GetRemovableDevice -- defaults to false */
90
 
  NULL, /* GetHardwareSlot -- defaults to false */
91
 
  ckmk_mdSlot_GetHardwareVersion,
92
 
  ckmk_mdSlot_GetFirmwareVersion,
93
 
  ckmk_mdSlot_GetToken,
94
 
  (void *)NULL /* null terminator */
95
 
};