2 * Testing tool for X.509v3 routines
3 * Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
18 #include "tls/x509v3.h"
20 extern int wpa_debug_level
;
23 int main(int argc
, char *argv
[])
28 struct x509_certificate
*cert
;
32 f
= fopen(argv
[1], "rb");
35 len
= fread(buf
, 1, sizeof(buf
), f
);
38 cert
= x509_certificate_parse(buf
, len
);
40 printf("Failed to parse X.509 certificate\n");
41 x509_certificate_free(cert
);