+static void hex_print(const char *name, const unsigned char *buf, size_t len)
+{
+ size_t i;
+ fprintf(stderr, "%s ", name);
+ for (i = 0; i < len; i++)
+ fprintf(stderr, "%02X", buf[i]);
+ fputs("\n", stderr);
+}
+
+static void print_expected(struct evp_test *t)
+{
+ if (t->out_expected == NULL)
+ return;
+ hex_print("Expected:", t->out_expected, t->out_len);
+ hex_print("Got: ", t->out_got, t->out_len);
+ OPENSSL_free(t->out_expected);
+ OPENSSL_free(t->out_got);
+ t->out_expected = NULL;
+ t->out_got = NULL;
+}
+