lib/sign: make dummy engine non-public

Remove unneeded public declaration for dummy signing engine.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
This commit is contained in:
Denis Pynkin 2019-12-04 20:40:55 +00:00
parent 8b3b35a04a
commit 4d0e3a66c5
4 changed files with 11 additions and 15 deletions

View File

@ -709,7 +709,6 @@ ostree_kernel_args_to_string
<SECTION> <SECTION>
<FILE>ostree-sign</FILE> <FILE>ostree-sign</FILE>
OstreeSign OstreeSign
OstreeSignDummy
OstreeSignEd25519 OstreeSignEd25519
ostree_sign_list_names ostree_sign_list_names
ostree_sign_commit ostree_sign_commit
@ -726,6 +725,5 @@ ostree_sign_set_sk
ostree_sign_summary ostree_sign_summary
<SUBSECTION Standard> <SUBSECTION Standard>
ostree_sign_get_type ostree_sign_get_type
ostree_sign_dummy_get_type
ostree_sign_ed25519_get_type ostree_sign_ed25519_get_type
</SECTION> </SECTION>

View File

@ -36,7 +36,6 @@ global:
ostree_sign_add_pk; ostree_sign_add_pk;
ostree_sign_set_sk; ostree_sign_set_sk;
ostree_sign_summary; ostree_sign_summary;
ostree_sign_dummy_get_type;
ostree_sign_ed25519_get_type; ostree_sign_ed25519_get_type;
} LIBOSTREE_2020.1; } LIBOSTREE_2020.1;

View File

@ -50,7 +50,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeSignDummy, g_object_unref)
static void static void
ostree_sign_dummy_iface_init (OstreeSignInterface *self); ostree_sign_dummy_iface_init (OstreeSignInterface *self);
G_DEFINE_TYPE_WITH_CODE (OstreeSignDummy, ostree_sign_dummy, G_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE (OstreeSignDummy, _ostree_sign_dummy, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (OSTREE_TYPE_SIGN, ostree_sign_dummy_iface_init)); G_IMPLEMENT_INTERFACE (OSTREE_TYPE_SIGN, ostree_sign_dummy_iface_init));
static void static void
@ -70,13 +70,13 @@ ostree_sign_dummy_iface_init (OstreeSignInterface *self)
} }
static void static void
ostree_sign_dummy_class_init (OstreeSignDummyClass *self) _ostree_sign_dummy_class_init (OstreeSignDummyClass *self)
{ {
g_debug ("%s enter", __FUNCTION__); g_debug ("%s enter", __FUNCTION__);
} }
static void static void
ostree_sign_dummy_init (OstreeSignDummy *self) _ostree_sign_dummy_init (OstreeSignDummy *self)
{ {
g_debug ("%s enter", __FUNCTION__); g_debug ("%s enter", __FUNCTION__);
@ -88,7 +88,7 @@ gboolean ostree_sign_dummy_set_sk (OstreeSign *self, GVariant *key, GError **err
{ {
g_debug ("%s enter", __FUNCTION__); g_debug ("%s enter", __FUNCTION__);
OstreeSignDummy *sign = ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); OstreeSignDummy *sign = _ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self));
g_free(sign->sk_ascii); g_free(sign->sk_ascii);
@ -101,7 +101,7 @@ gboolean ostree_sign_dummy_set_pk (OstreeSign *self, GVariant *key, GError **err
{ {
g_debug ("%s enter", __FUNCTION__); g_debug ("%s enter", __FUNCTION__);
OstreeSignDummy *sign = ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); OstreeSignDummy *sign = _ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self));
g_free(sign->pk_ascii); g_free(sign->pk_ascii);
@ -120,7 +120,7 @@ gboolean ostree_sign_dummy_data (OstreeSign *self,
g_debug ("%s enter", __FUNCTION__); g_debug ("%s enter", __FUNCTION__);
g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE); g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE);
OstreeSignDummy *sign = ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); OstreeSignDummy *sign = _ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self));
*signature = g_bytes_new (sign->sk_ascii, strlen(sign->sk_ascii)); *signature = g_bytes_new (sign->sk_ascii, strlen(sign->sk_ascii));
@ -158,7 +158,7 @@ gboolean ostree_sign_dummy_data_verify (OstreeSign *self,
g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE); g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE);
g_return_val_if_fail (data != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE);
OstreeSignDummy *sign = ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self)); OstreeSignDummy *sign = _ostree_sign_dummy_get_instance_private(OSTREE_SIGN_DUMMY(self));
gboolean ret = FALSE; gboolean ret = FALSE;

View File

@ -30,17 +30,16 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define OSTREE_TYPE_SIGN_DUMMY (ostree_sign_dummy_get_type ()) #define OSTREE_TYPE_SIGN_DUMMY (_ostree_sign_dummy_get_type ())
_OSTREE_PUBLIC GType _ostree_sign_dummy_get_type (void);
GType ostree_sign_dummy_get_type (void);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS G_GNUC_BEGIN_IGNORE_DEPRECATIONS
typedef struct _OstreeSignDummy OstreeSignDummy; typedef struct _OstreeSignDummy OstreeSignDummy;
typedef struct { GObjectClass parent_class; } OstreeSignDummyClass; typedef struct { GObjectClass parent_class; } OstreeSignDummyClass;
static inline OstreeSignDummy *OSTREE_SIGN_DUMMY (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_CAST (ptr, ostree_sign_dummy_get_type (), OstreeSignDummy); } static inline OstreeSignDummy *OSTREE_SIGN_DUMMY (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_CAST (ptr, _ostree_sign_dummy_get_type (), OstreeSignDummy); }
static inline gboolean OSTREE_IS_SIGN_DUMMY (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_TYPE (ptr, ostree_sign_dummy_get_type ()); } static inline gboolean OSTREE_IS_SIGN_DUMMY (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_TYPE (ptr, _ostree_sign_dummy_get_type ()); }
G_GNUC_END_IGNORE_DEPRECATIONS G_GNUC_END_IGNORE_DEPRECATIONS