2 * Copyright (C) 2004, 2005 Free Software Foundation
4 * Author: Simon Josefsson
6 * This file is part of GNUTLS.
8 * GNUTLS is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * GNUTLS is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with GNUTLS; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
31 #include <gnutls/openssl.h>
37 unsigned char md
[MD5_DIGEST_LENGTH
];
39 if (!gnutls_check_version (LIBGNUTLS_VERSION
))
40 success ("gnutls_check_version ERROR\n");
43 MD5_Update (&c
, "abc", 3);
44 MD5_Final (&(md
[0]), &c
);
46 if (memcmp (md
, "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
47 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72", sizeof (md
)) != 0)
49 hexprint (md
, sizeof (md
));
50 fail ("MD5 failure\n");