summaryrefslogtreecommitdiff
path: root/egg/egg-asn1x.h
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2011-10-04 18:15:37 +0200
committerStef Walter <stefw@collabora.co.uk>2011-10-04 18:15:37 +0200
commit3ed15e88675ef6055706cabe805a8ddf0f782e22 (patch)
tree98a920e5925cd2bf2dc00ef62ff8890435f36181 /egg/egg-asn1x.h
parente97c283d65e2ba0bcd6676839b361eedb14c52dc (diff)
downloadgnome-keyring-3ed15e88675ef6055706cabe805a8ddf0f782e22.tar.gz
egg: Fix parsing of unsigned integers in DER
* When the unsigned integer had a high bit set, we would store/parse it incorrectly. We have to force these numbers to be unsigned so we prefix/strip an extra zero byte on the front. * Also make accessing raw and usg numbers in DER not have to copy the value, since these are often sensitive.
Diffstat (limited to 'egg/egg-asn1x.h')
-rw-r--r--egg/egg-asn1x.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/egg/egg-asn1x.h b/egg/egg-asn1x.h
index b6c8427e..3f746557 100644
--- a/egg/egg-asn1x.h
+++ b/egg/egg-asn1x.h
@@ -102,8 +102,7 @@ gboolean egg_asn1x_get_integer_as_ulong (GNode *node,
gboolean egg_asn1x_set_integer_as_ulong (GNode *node,
gulong value);
-gpointer egg_asn1x_get_integer_as_raw (GNode *node,
- EggAllocator allocator,
+gconstpointer egg_asn1x_get_integer_as_raw (GNode *node,
gsize *n_data);
gboolean egg_asn1x_set_integer_as_raw (GNode *node,
@@ -111,6 +110,14 @@ gboolean egg_asn1x_set_integer_as_raw (GNode *node,
gsize n_data,
GDestroyNotify destroy);
+gconstpointer egg_asn1x_get_integer_as_usg (GNode *node,
+ gsize *n_data);
+
+gboolean egg_asn1x_set_integer_as_usg (GNode *node,
+ gconstpointer data,
+ gsize n_data,
+ GDestroyNotify destroy);
+
gconstpointer egg_asn1x_get_raw_value (GNode *node,
gsize *n_content);