gcr: Stop parsing PKCS#12 bag if locked
authorStef Walter <stefw@collabora.co.uk>
Fri, 2 Sep 2011 11:43:49 +0000 (13:43 +0200)
committerStef Walter <stefw@collabora.co.uk>
Fri, 2 Sep 2011 11:46:56 +0000 (13:46 +0200)
 * This allows GcrUnlockRenderer to work correctly for certain
   types of PKCS#12 files it was screwing up on before.

gcr/gcr-parser.c

index 05d17b9..3a4f37f 100644 (file)
@@ -948,7 +948,9 @@ handle_pkcs12_bag (GcrParser *self, const guchar *data, gsize n_data)
                if (friendly != NULL)
                        parsed_label (self, NULL);
 
-               if (r == GCR_ERROR_FAILURE || r == GCR_ERROR_CANCELLED) {
+               if (r == GCR_ERROR_FAILURE ||
+                   r == GCR_ERROR_CANCELLED ||
+                   r == GCR_ERROR_LOCKED) {
                        ret = r;
                        goto done;
                }