aboutsummaryrefslogtreecommitdiffstats
path: root/src/extra_tests/fuzzers/jigs/pkcs8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/extra_tests/fuzzers/jigs/pkcs8.cpp')
-rw-r--r--src/extra_tests/fuzzers/jigs/pkcs8.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/extra_tests/fuzzers/jigs/pkcs8.cpp b/src/extra_tests/fuzzers/jigs/pkcs8.cpp
new file mode 100644
index 000000000..69e2c193f
--- /dev/null
+++ b/src/extra_tests/fuzzers/jigs/pkcs8.cpp
@@ -0,0 +1,20 @@
+/*
+* (C) 2015,2016 Jack Lloyd
+*
+* Botan is released under the Simplified BSD License (see license.txt)
+*/
+#include "driver.h"
+
+#include <botan/pkcs8.h>
+#include <botan/system_rng.h>
+
+void fuzz(const uint8_t in[], size_t len)
+ {
+ try
+ {
+ System_RNG rng;
+ DataSource_Memory input(in, len);
+ std::unique_ptr<Private_Key> key(PKCS8::load_key(input, rng));
+ }
+ catch(Botan::Exception& e) { }
+ }