Commit 6a5adea4 authored by Stef Walter's avatar Stef Walter

Deprecate libgnome-keyring. Use libsecret instead

This has been years in coming, but now that the libsecret
API is stable, deprecate the libgnome-keyring API.
parent a8326fbc
......@@ -208,15 +208,11 @@ AC_ARG_ENABLE(strict, [
AC_MSG_CHECKING([build strict])
if test "$enable_strict" = "yes"; then
CFLAGS="$CFLAGS -Werror \
-DGTK_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED"
CFLAGS="$CFLAGS -Werror"
TEST_MODE="thorough"
INTROSPECTION_FLAGS="--warn-error"
AC_DEFINE_UNQUOTED(WITH_STRICT, 1, [More strict checks])
strict_status="yes (-Werror, thorough tests, fatals, no deprecations)"
strict_status="yes (-Werror, thorough tests, fatals)"
else
TEST_MODE="quick"
INTROSPECTION_FLAGS=""
......
......@@ -4,6 +4,11 @@
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>gnome-keyring Reference Manual</title>
<releaseinfo>
<warning>libgnome-keyring is deprecated. Use
<ulink href="http://developer.gnome.org/libsecret/stable/">libsecret</ulink>
instead.</warning>
</releaseinfo>
</bookinfo>
<chapter>
......
......@@ -188,6 +188,8 @@ gnome_keyring_set_network_password_sync
gnome_keyring_is_available
gnome_keyring_cancel_request
gnome_keyring_string_list_free
GNOME_KEYRING_DEPRECATED
GNOME_KEYRING_DEPRECATED_FOR
</SECTION>
<SECTION>
<FILE>gnome-keyring-daemon</FILE>
......
......@@ -11,7 +11,8 @@ INCLUDES= \
-I$(top_srcdir) \
-I$(top_builddir) \
$(LIBRARY_CFLAGS) \
$(LIBGCRYPT_CFLAGS)
$(LIBGCRYPT_CFLAGS) \
-DGNOME_KEYRING_COMPILATION
PUBLIC_SOURCES = \
gnome-keyring.c \
......
......@@ -37,6 +37,10 @@
* @title: Non-pageable Memory
* @short_description: Secure Non-pageable Memory
*
* <warning>All of these APIs are deprecated. Use
* <ulink href="http://developer.gnome.org/libsecret/stable/">libsecret</ulink>
* instead.</warning>
*
* Normal allocated memory can be paged to disk at the whim of the operating system.
* This can be a serious problem for sensitive information like passwords, keys and secrets.
*
......@@ -126,6 +130,8 @@ EGG_SECURE_DECLARE (libgnome_keyring_memory);
*
* Return value: (transfer full): The new memory block which should be freed
* with gnome_keyring_memory_free()
*
* Deprecated: Use gcr_secure_memory_alloc() instead.
**/
gpointer
gnome_keyring_memory_alloc (gulong sz)
......@@ -151,6 +157,8 @@ gnome_keyring_memory_alloc (gulong sz)
*
* Return value: (transfer full): The new block, or %NULL if memory cannot be
* allocated. The memory block should be freed with gnome_keyring_memory_free()
*
* Deprecated: Use gcr_secure_memory_try_alloc() instead.
*/
gpointer
gnome_keyring_memory_try_alloc (gulong sz)
......@@ -175,6 +183,8 @@ gnome_keyring_memory_try_alloc (gulong sz)
*
* Return value: (transfer full): The new block, or %NULL if the block was
* freed. The memory block should be freed with gnome_keyring_memory_free()
*
* Deprecated: Use gcr_secure_memory_realloc() instead.
*/
gpointer
gnome_keyring_memory_realloc (gpointer p, gulong sz)
......@@ -214,6 +224,8 @@ gnome_keyring_memory_realloc (gpointer p, gulong sz)
*
* Return value: (transfer full): The new block, or %NULL if memory cannot be
* allocated. The memory block should be freed with gnome_keyring_memory_free()
*
* Deprecated: Use gcr_secure_memory_try_realloc() instead.
*/
gpointer
gnome_keyring_memory_try_realloc (gpointer p, gulong sz)
......@@ -245,6 +257,8 @@ gnome_keyring_memory_try_realloc (gpointer p, gulong sz)
*
* Glib memory is also freed correctly when passed to this function. If called
* with a null pointer then no action is taken.
*
* Deprecated: Use gcr_secure_memory_free() instead.
*/
void
gnome_keyring_memory_free (gpointer p)
......@@ -261,6 +275,8 @@ gnome_keyring_memory_free (gpointer p)
* Check if a pointer is in non-pageable memory allocated by gnome-keyring.
*
* Return value: Whether the memory is non-pageable or not
*
* Deprecated: Use gcr_secure_memory_is_secure() instead.
*/
gboolean
gnome_keyring_memory_is_secure (gpointer p)
......@@ -276,6 +292,8 @@ gnome_keyring_memory_is_secure (gpointer p)
* %NULL will be returned.
*
* Return value: The copied string, should be freed with gnome_keyring_memory_free()
*
* Deprecated: Use gcr_secure_memory_strdup() instead.
*/
gchar*
gnome_keyring_memory_strdup (const gchar* str)
......
......@@ -26,8 +26,18 @@
#include <glib.h>
#if !defined(GNOME_KEYRING_COMPILATION) && defined(G_DEPRECATED)
#define GNOME_KEYRING_DEPRECATED GNOME_KEYRING_DEPRECATED
#define GNOME_KEYRING_DEPRECATED_FOR(x) GNOME_KEYRING_DEPRECATED(x)
#else
#define GNOME_KEYRING_DEPRECATED
#define GNOME_KEYRING_DEPRECATED_FOR(x)
#endif
G_BEGIN_DECLS
#ifndef GNOME_KEYRING_DISABLE_DEPRECATED
/**
* gnome_keyring_memory_new:
* @type: The C type of the objects to allocate
......@@ -36,24 +46,35 @@ G_BEGIN_DECLS
* Allocate objects in non-pageable gnome-keyring memory.
*
* Return value: The new block of memory.
*
* Deprecated: Use gcr_secure_memory_alloc() instead.
**/
#define gnome_keyring_memory_new(type, n_objects) \
((type*)(gnome_keyring_memory_alloc (sizeof (type) * (n_objects))))
GNOME_KEYRING_DEPRECATED_FOR(gcr_secure_memory_alloc)
gpointer gnome_keyring_memory_alloc (gulong sz);
GNOME_KEYRING_DEPRECATED_FOR(gcr_secure_memory_try_alloc)
gpointer gnome_keyring_memory_try_alloc (gulong sz);
GNOME_KEYRING_DEPRECATED_FOR(gcr_secure_memory_realloc)
gpointer gnome_keyring_memory_realloc (gpointer p, gulong sz);
GNOME_KEYRING_DEPRECATED_FOR(gcr_secure_memory_try_realloc)
gpointer gnome_keyring_memory_try_realloc (gpointer p, gulong sz);
GNOME_KEYRING_DEPRECATED_FOR(gcr_secure_memory_free)
void gnome_keyring_memory_free (gpointer p);
GNOME_KEYRING_DEPRECATED_FOR(gcr_secure_memory_is_secure)
gboolean gnome_keyring_memory_is_secure (gpointer p);
GNOME_KEYRING_DEPRECATED_FOR(gcr_secure_memory_strdup)
gchar* gnome_keyring_memory_strdup (const gchar* str);
#endif /* GNOME_KEYRING_DISABLE_DEPRECATED */
G_END_DECLS
#endif /* GNOME_KEYRING_MEMORY_H */
......@@ -24,6 +24,8 @@
#ifndef GNOME_KEYRING_RESULT_H
#define GNOME_KEYRING_RESULT_H
#ifndef GNOME_KEYRING_DISABLE_DEPRECATED
typedef enum {
GNOME_KEYRING_RESULT_OK,
GNOME_KEYRING_RESULT_DENIED,
......@@ -40,4 +42,6 @@ typedef enum {
#define GNOME_KEYRING_RESULT_ALREADY_EXISTS \
GNOME_KEYRING_RESULT_KEYRING_ALREADY_EXISTS
#endif /* GNOME_KEYRING_DISABLE_DEPRECATED */
#endif /* GNOME_KEYRING_RESULT_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,8 @@ INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/library \
-DSRCDIR="\"@abs_srcdir@\"" \
$(LIBRARY_CFLAGS)
$(LIBRARY_CFLAGS) \
-DGNOME_KEYRING_COMPILATION
noinst_LTLIBRARIES = libmock-service.la
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment