diff options
Diffstat (limited to 'egg')
-rw-r--r-- | egg/egg-openssl.c | 8 | ||||
-rw-r--r-- | egg/egg-openssl.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/egg/egg-openssl.c b/egg/egg-openssl.c index 2e83e63e..f22a2bdc 100644 --- a/egg/egg-openssl.c +++ b/egg/egg-openssl.c @@ -234,7 +234,7 @@ egg_openssl_headers_new (void) } guint -egg_openssl_pem_parse (const guchar *data, gsize n_data, +egg_openssl_pem_parse (gconstpointer data, gsize n_data, EggOpensslPemCallback callback, gpointer user_data) { const gchar *beg, *end; @@ -258,7 +258,7 @@ egg_openssl_pem_parse (const guchar *data, gsize n_data, g_assert (type); /* This returns the character position before the PEM END header */ - end = pem_find_end ((const gchar*)beg, n_data - ((const guchar*)beg - data), type); + end = pem_find_end ((const gchar*)beg, n_data - ((const gchar*)beg - (const gchar *)data), type); if (!end) break; @@ -274,8 +274,8 @@ egg_openssl_pem_parse (const guchar *data, gsize n_data, /* Try for another block */ end += PEM_SUFF_L; - n_data -= (const guchar*)end - data; - data = (const guchar*)end; + n_data -= (const gchar*)end - (const gchar*)data; + data = end; } if (headers) diff --git a/egg/egg-openssl.h b/egg/egg-openssl.h index 878cf589..3253d73e 100644 --- a/egg/egg-openssl.h +++ b/egg/egg-openssl.h @@ -31,7 +31,7 @@ typedef void (*EggOpensslPemCallback) (GQuark type, const guchar *data, gsize n_ GHashTable* egg_openssl_headers_new (void); -guint egg_openssl_pem_parse (const guchar *data, gsize n_data, +guint egg_openssl_pem_parse (gconstpointer data, gsize n_data, EggOpensslPemCallback callback, gpointer user_data); |