2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License (), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright 2018, Joyent, Inc.
17 #include <sys/types.h>
18 #include "cryptotest.h"
20 extern size_t msgcount
;
21 extern uint8_t *MSG
[];
22 extern size_t MSGLEN
[];
25 extern char *mechname
;
32 cryptotest_t args
= { 0 };
35 args
.outlen
= sizeof (N
);
37 args
.mechname
= mechname
;
40 for (i
= 0; i
< msgcount
; i
++) {
42 args
.inlen
= MSGLEN
[i
];
44 errs
+= run_test(&args
, MD
[i
], mdlen
, DIGEST_FG
);
48 (void) fprintf(stderr
, "%d tests failed\n", errs
);