]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - fuzz/server.c
Add a FuzzerClean() function
[thirdparty/openssl.git] / fuzz / server.c
index 35449d8caa8a769b68e10dfb52dee46ed0670499..b8a3ac44e382a11b2d5fe88b1b1caaaa1087f5af 100644 (file)
@@ -191,7 +191,8 @@ static const uint8_t kRSAPrivateKeyDER[] = {
 
 static SSL_CTX *ctx;
 
-int FuzzerInitialize(int *argc, char ***argv) {
+int FuzzerInitialize(int *argc, char ***argv)
+{
     const uint8_t *bufp = kRSAPrivateKeyDER;
     RSA *privkey;
     EVP_PKEY *pkey;
@@ -216,7 +217,8 @@ int FuzzerInitialize(int *argc, char ***argv) {
     return 1;
 }
 
-int FuzzerTestOneInput(const uint8_t *buf, size_t len) {
+int FuzzerTestOneInput(const uint8_t *buf, size_t len)
+{
     SSL *server;
     BIO *in;
     BIO *out;
@@ -248,3 +250,8 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len) {
     SSL_free(server);
     return 0;
 }
+
+void FuzzerCleanup(void)
+{
+    SSL_CTX_free(ctx);
+}