diff options
author | Stef Walter <stef@thewalter.net> | 2013-07-08 16:36:50 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2013-07-08 16:43:41 +0200 |
commit | 03787ae83b1911118a7a689c4817bbce1e74dabd (patch) | |
tree | c7c83e748d6c4f935e7a4269fde0880f42c29f4d /trust/asn1.c | |
parent | 9f7c426d5a6bfb0e60895a690ed835c47e04cb4e (diff) | |
download | p11-kit-03787ae83b1911118a7a689c4817bbce1e74dabd.tar.gz |
trust: Support using the parser without an asn1_cache
Diffstat (limited to 'trust/asn1.c')
-rw-r--r-- | trust/asn1.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/trust/asn1.c b/trust/asn1.c index 653d816..7ed3b01 100644 --- a/trust/asn1.c +++ b/trust/asn1.c @@ -302,7 +302,9 @@ p11_asn1_cache_get (p11_asn1_cache *cache, { asn1_item *item; - return_val_if_fail (cache != NULL, NULL); + if (cache == NULL) + return NULL; + return_val_if_fail (struct_name != NULL, NULL); return_val_if_fail (der != NULL, NULL); @@ -325,7 +327,9 @@ p11_asn1_cache_take (p11_asn1_cache *cache, { asn1_item *item; - return_if_fail (cache != NULL); + if (cache == NULL) + return; + return_if_fail (struct_name != NULL); return_if_fail (der != NULL); return_if_fail (der_len != 0); @@ -345,7 +349,8 @@ p11_asn1_cache_take (p11_asn1_cache *cache, void p11_asn1_cache_flush (p11_asn1_cache *cache) { - return_if_fail (cache != NULL); + if (cache == NULL) + return; p11_dict_clear (cache->items); } |