Merge branch 'dnssec'
[strongswan.git] / scripts / crypt_burn.c
index 64eb162..449364a 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <stdio.h>
 #include <library.h>
-#include <crypto/proposal/proposal_keywords.h>
 
 int main(int argc, char *argv[])
 {
@@ -47,7 +46,7 @@ int main(int argc, char *argv[])
                limit = atoi(argv[2]);
        }
 
-       token = proposal_get_token(argv[1], strlen(argv[1]));
+       token = lib->proposal->get_token(lib->proposal, argv[1]);
        if (!token)
        {
                fprintf(stderr, "algorithm '%s' unknown!\n", argv[1]);
@@ -110,9 +109,12 @@ int main(int argc, char *argv[])
                        {
                                continue;
                        }
-                       crypter->decrypt(crypter,
-                               chunk_create(buffer, sizeof(buffer) / bs * bs),
-                               chunk_create(iv, crypter->get_iv_size(crypter)), NULL);
+                       if (!crypter->decrypt(crypter,
+                                       chunk_create(buffer, sizeof(buffer) / bs * bs),
+                                       chunk_create(iv, crypter->get_iv_size(crypter)), NULL))
+                       {
+                               continue;
+                       }
                        if (limit && ++i == limit)
                        {
                                break;