]>
git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/pem/pem_oth.c
2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 #include "internal/cryptlib.h"
12 #include <openssl/buffer.h>
13 #include <openssl/objects.h>
14 #include <openssl/evp.h>
15 #include <openssl/rand.h>
16 #include <openssl/x509.h>
17 #include <openssl/pem.h>
19 /* Handle 'other' PEMs: not private keys */
21 void *PEM_ASN1_read_bio(d2i_of_void
*d2i
, const char *name
, BIO
*bp
, void **x
,
22 pem_password_cb
*cb
, void *u
)
24 const unsigned char *p
= NULL
;
25 unsigned char *data
= NULL
;
29 if (!PEM_bytes_read_bio(&data
, &len
, NULL
, name
, bp
, cb
, u
))
32 ret
= d2i(x
, &p
, len
);
34 PEMerr(PEM_F_PEM_ASN1_READ_BIO
, ERR_R_ASN1_LIB
);