pem_x509.c revision 296465
1251599Sdas/* pem_x509.c */
2141296Sdas/*
3141296Sdas * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
42116Sjkh * 2001.
52116Sjkh */
62116Sjkh/* ====================================================================
72116Sjkh * Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
8141296Sdas *
92116Sjkh * Redistribution and use in source and binary forms, with or without
10141296Sdas * modification, are permitted provided that the following conditions
112116Sjkh * are met:
122116Sjkh *
13141296Sdas * 1. Redistributions of source code must retain the above copyright
142116Sjkh *    notice, this list of conditions and the following disclaimer.
152116Sjkh *
16176451Sdas * 2. Redistributions in binary form must reproduce the above copyright
17176451Sdas *    notice, this list of conditions and the following disclaimer in
182116Sjkh *    the documentation and/or other materials provided with the
19251599Sdas *    distribution.
20251599Sdas *
212116Sjkh * 3. All advertising materials mentioning features or use of this
22251599Sdas *    software must display the following acknowledgment:
23251599Sdas *    "This product includes software developed by the OpenSSL Project
242116Sjkh *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
252116Sjkh *
26251599Sdas * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
27251599Sdas *    endorse or promote products derived from this software without
28251599Sdas *    prior written permission. For written permission, please contact
29251599Sdas *    licensing@OpenSSL.org.
30251599Sdas *
31251599Sdas * 5. Products derived from this software may not be called "OpenSSL"
322116Sjkh *    nor may "OpenSSL" appear in their names without prior written
332116Sjkh *    permission of the OpenSSL Project.
342116Sjkh *
35251599Sdas * 6. Redistributions of any form whatsoever must retain the following
36251599Sdas *    acknowledgment:
37251599Sdas *    "This product includes software developed by the OpenSSL Project
38251599Sdas *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
39251599Sdas *
40251599Sdas * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
41251599Sdas * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42251599Sdas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
43251599Sdas * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
44251599Sdas * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45251599Sdas * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
46251599Sdas * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
47251599Sdas * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48251599Sdas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
49251599Sdas * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
50251599Sdas * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
518870Srgrimes * OF THE POSSIBILITY OF SUCH DAMAGE.
52251599Sdas * ====================================================================
532116Sjkh *
54251599Sdas * This product includes cryptographic software written by Eric Young
55251599Sdas * (eay@cryptsoft.com).  This product includes software written by Tim
56251599Sdas * Hudson (tjh@cryptsoft.com).
57251599Sdas *
58251599Sdas */
59251599Sdas
60251599Sdas#include <stdio.h>
61251599Sdas#undef SSLEAY_MACROS
62251599Sdas#include "cryptlib.h"
63251599Sdas#include <openssl/bio.h>
64251599Sdas#include <openssl/evp.h>
65251599Sdas#include <openssl/x509.h>
66251599Sdas#include <openssl/pkcs7.h>
678870Srgrimes#include <openssl/pem.h>
68251599Sdas
69251599SdasIMPLEMENT_PEM_rw(X509, X509, PEM_STRING_X509, X509)
70251599Sdas