1 /* Functions defined in x509parse.c, which are not exported (static there) */
3 * X.509 certificate and private key decoding
5 * Copyright (C) 2006-2010, Brainspark B.V.
7 * This file is part of PolarSSL (http://www.polarssl.org)
8 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
10 * All rights reserved.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * The ITU-T X.509 standard defines a certificat format for PKI.
29 * http://www.ietf.org/rfc/rfc2459.txt
30 * http://www.ietf.org/rfc/rfc3279.txt
32 * ftp://ftp.rsasecurity.com/pub/pkcs/ascii/pkcs-1v2.asc
34 * http://www.itu.int/ITU-T/studygroups/com17/languages/X.680-0207.pdf
35 * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
40 int asn1_get_mpi( unsigned char **p,
41 const unsigned char *end,
44 int asn1_get_tag( unsigned char **p,
45 const unsigned char *end,
48 int asn1_get_int( unsigned char **p,
49 const unsigned char *end,