2 * Copyright (C) 2000,2001 Fabio Fiorina
4 * This file is part of GNUTLS.
6 * GNUTLS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * GNUTLS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
22 /*****************************************************/
23 /* File: PkixTabExample.c */
24 /* Description: An example on how to use the */
25 /* 'asn1_parser_asn1_file_c' function. */
26 /*****************************************************/
30 #include "../lib/gnutls.h"
31 #include "../lib/x509_der.h"
34 main(int argc
,char *argv
[])
40 fprintf(stderr
, "Usage: %s: input.asn output.c\n", argv
[0]);
44 if (argc
==3) outfile
=argv
[2];
47 result
=asn1_parser_asn1_file_c( argv
[1], outfile
);
49 if(result
==ASN_SYNTAX_ERROR
){
50 printf("PARSE ERROR\n");
53 else if(result
==ASN_IDENTIFIER_NOT_FOUND
){
54 printf("IDENTIFIER NOT FOUND\n");
57 else if(result
==ASN_FILE_NOT_FOUND
){
58 printf("FILE NOT FOUND\n");