gnome-keyring r1618 - in trunk: . pkcs11 pkcs11/gck pkcs11/plex-layer pkcs11/rpc-layer
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-keyring r1618 - in trunk: . pkcs11 pkcs11/gck pkcs11/plex-layer pkcs11/rpc-layer
- Date: Thu, 26 Feb 2009 05:40:37 +0000 (UTC)
Author: nnielsen
Date: Thu Feb 26 05:40:37 2009
New Revision: 1618
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1618&view=rev
Log:
Move internal definitions a non public header file.
Added:
trunk/pkcs11/pkcs11i.h
Modified:
trunk/ChangeLog
trunk/pkcs11/Makefile.am
trunk/pkcs11/gck/gck-module.c
trunk/pkcs11/pkcs11g.h
trunk/pkcs11/plex-layer/gck-plex-layer.c
trunk/pkcs11/rpc-layer/gck-rpc-dispatch.c
Modified: trunk/pkcs11/Makefile.am
==============================================================================
--- trunk/pkcs11/Makefile.am (original)
+++ trunk/pkcs11/Makefile.am Thu Feb 26 05:40:37 2009
@@ -5,7 +5,10 @@
inc_HEADERS = \
pkcs11.h \
pkcs11g.h \
- pkcs11n.h
+ pkcs11n.h
+
+EXTRA_DIST = \
+ pkcs11i.h
SUBDIRS = . \
gck \
Modified: trunk/pkcs11/gck/gck-module.c
==============================================================================
--- trunk/pkcs11/gck/gck-module.c (original)
+++ trunk/pkcs11/gck/gck-module.c Thu Feb 26 05:40:37 2009
@@ -23,6 +23,7 @@
#include "pkcs11/pkcs11.h"
#include "pkcs11/pkcs11g.h"
+#include "pkcs11/pkcs11i.h"
#include "gck-attributes.h"
#include "gck-certificate.h"
Modified: trunk/pkcs11/pkcs11g.h
==============================================================================
--- trunk/pkcs11/pkcs11g.h (original)
+++ trunk/pkcs11/pkcs11g.h Thu Feb 26 05:40:37 2009
@@ -29,47 +29,6 @@
#define CKA_GNOME (CKA_VENDOR_DEFINED | 0x474E4D45 /* GNME */ )
#define CKO_GNOME (CKO_VENDOR_DEFINED | 0x474E4D45 /* GNME */ )
-
-/* ----------------------------------------------------------------------
- * APARTMENT SLOTS
- *
- * The lower 10 bits of the CK_SLOT_ID are used as the actual slot identifier,
- * and the remainder are used as application identifiers.
- *
- * This enables a single loaded module to serve multiple applications
- * concurrently. The caller of a module should check the
- * CKF_GNOME_VIRTUAL_SLOTS flag before using this functionality.
- */
-
-/* Flag for CK_INFO when virtual slots are supported */
-#define CKF_GNOME_APPARTMENTS 0x40000000
-
-/* Get an actual slot id from a virtual slot */
-#define CK_GNOME_APPARTMENT_SLOT(virt) ((virt) & 0x000003FF)
-
-/* Get an app id from a virtual slot */
-#define CK_GNOME_APPARTMENT_APP(virt) ((virt) >> 10)
-
-/* Is the app id valid for use in a virtual slot? */
-#define CK_GNOME_APPARTMENT_IS_APP(app) ((app) < (((CK_ULONG)-1) >> 10))
-
-/* Build a virtual slot from an actual slot id, and an app id */
-#define CK_GNOME_MAKE_APPARTMENT(slot, app) (((slot) & 0x000003FF) | ((app) << 10))
-
-
-/* -------------------------------------------------------------------
- * LIMITED HANDLES
- *
- * The upper 10 bits of a CK_SESSION_HANDLE and CK_OBJECT_HANDLE are
- * never used by Gnome Keyring PKCS#11 modules. These bits are used
- * for tracking purposes when combining modules into a single module.
- */
-
-#define CK_GNOME_MAX_SLOT (0x000003FF)
-#define CK_GNOME_MAX_APP (((CK_ULONG)-1) >> 10)
-#define CK_GNOME_MAX_HANDLE (((CK_ULONG)-1) >> 10)
-
-
/* -------------------------------------------------------------------
* OBJECT AUTHENTICATION
*/
Added: trunk/pkcs11/pkcs11i.h
==============================================================================
--- (empty file)
+++ trunk/pkcs11/pkcs11i.h Thu Feb 26 05:40:37 2009
@@ -0,0 +1,69 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* pkcs11g.h - GNOME internal definitions to PKCS#11
+
+ Copyright (C) 2008, Stef Walter
+
+ The Gnome Keyring Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The Gnome Keyring Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the Gnome Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+ Author: Stef Walter <stef memberwebs com>
+*/
+
+#ifndef PKCS11I_H
+#define PKCS11I_H
+
+#include "pkcs11.h"
+#include "pkcs11g.h"
+
+/* ----------------------------------------------------------------------
+ * APARTMENT SLOTS
+ *
+ * The lower 10 bits of the CK_SLOT_ID are used as the actual slot identifier,
+ * and the remainder are used as application identifiers.
+ *
+ * This enables a single loaded module to serve multiple applications
+ * concurrently. The caller of a module should check the
+ * CKF_GNOME_VIRTUAL_SLOTS flag before using this functionality.
+ */
+
+/* Flag for CK_INFO when virtual slots are supported */
+#define CKF_GNOME_APPARTMENTS 0x40000000
+
+/* Get an actual slot id from a virtual slot */
+#define CK_GNOME_APPARTMENT_SLOT(virt) ((virt) & 0x000003FF)
+
+/* Get an app id from a virtual slot */
+#define CK_GNOME_APPARTMENT_APP(virt) ((virt) >> 10)
+
+/* Is the app id valid for use in a virtual slot? */
+#define CK_GNOME_APPARTMENT_IS_APP(app) ((app) < (((CK_ULONG)-1) >> 10))
+
+/* Build a virtual slot from an actual slot id, and an app id */
+#define CK_GNOME_MAKE_APPARTMENT(slot, app) (((slot) & 0x000003FF) | ((app) << 10))
+
+
+/* -------------------------------------------------------------------
+ * LIMITED HANDLES
+ *
+ * The upper 10 bits of a CK_SESSION_HANDLE and CK_OBJECT_HANDLE are
+ * never used by Gnome Keyring PKCS#11 modules. These bits are used
+ * for tracking purposes when combining modules into a single module.
+ */
+
+#define CK_GNOME_MAX_SLOT (0x000003FF)
+#define CK_GNOME_MAX_APP (((CK_ULONG)-1) >> 10)
+#define CK_GNOME_MAX_HANDLE (((CK_ULONG)-1) >> 10)
+
+#endif /* PKCS11I_H */
Modified: trunk/pkcs11/plex-layer/gck-plex-layer.c
==============================================================================
--- trunk/pkcs11/plex-layer/gck-plex-layer.c (original)
+++ trunk/pkcs11/plex-layer/gck-plex-layer.c Thu Feb 26 05:40:37 2009
@@ -25,6 +25,7 @@
#include "pkcs11/pkcs11.h"
#include "pkcs11/pkcs11g.h"
+#include "pkcs11/pkcs11i.h"
#include <glib.h>
Modified: trunk/pkcs11/rpc-layer/gck-rpc-dispatch.c
==============================================================================
--- trunk/pkcs11/rpc-layer/gck-rpc-dispatch.c (original)
+++ trunk/pkcs11/rpc-layer/gck-rpc-dispatch.c Thu Feb 26 05:40:37 2009
@@ -28,6 +28,7 @@
#include "pkcs11/pkcs11.h"
#include "pkcs11/pkcs11g.h"
+#include "pkcs11/pkcs11i.h"
#include "egg/egg-unix-credentials.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]