early-access version 2698
This commit is contained in:
4
externals/libressl/crypto/pem/pem_info.c
vendored
4
externals/libressl/crypto/pem/pem_info.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pem_info.c,v 1.24 2020/07/25 11:53:37 schwarze Exp $ */
|
||||
/* $OpenBSD: pem_info.c,v 1.25 2021/12/12 21:30:14 tb Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -75,6 +75,8 @@
|
||||
#include <openssl/rsa.h>
|
||||
#endif
|
||||
|
||||
#include "evp_locl.h"
|
||||
|
||||
STACK_OF(X509_INFO) *
|
||||
PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb,
|
||||
void *u)
|
||||
|
3
externals/libressl/crypto/pem/pem_lib.c
vendored
3
externals/libressl/crypto/pem/pem_lib.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pem_lib.c,v 1.49 2019/09/06 17:41:05 jsing Exp $ */
|
||||
/* $OpenBSD: pem_lib.c,v 1.50 2021/12/12 21:30:14 tb Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -79,6 +79,7 @@
|
||||
#endif
|
||||
|
||||
#include "asn1_locl.h"
|
||||
#include "evp_locl.h"
|
||||
|
||||
#define MIN_LENGTH 4
|
||||
|
||||
|
18
externals/libressl/crypto/pem/pem_pkey.c
vendored
18
externals/libressl/crypto/pem/pem_pkey.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pem_pkey.c,v 1.23 2017/05/02 03:59:44 deraadt Exp $ */
|
||||
/* $OpenBSD: pem_pkey.c,v 1.25 2021/12/24 12:59:18 tb Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -74,6 +74,7 @@
|
||||
#endif
|
||||
|
||||
#include "asn1_locl.h"
|
||||
#include "evp_locl.h"
|
||||
|
||||
int pem_check_suffix(const char *pem_str, const char *suffix);
|
||||
|
||||
@@ -151,12 +152,21 @@ int
|
||||
PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
|
||||
unsigned char *kstr, int klen, pem_password_cb *cb, void *u)
|
||||
{
|
||||
char pem_str[80];
|
||||
|
||||
if (!x->ameth || x->ameth->priv_encode)
|
||||
if (x->ameth == NULL || x->ameth->priv_encode != NULL)
|
||||
return PEM_write_bio_PKCS8PrivateKey(bp, x, enc,
|
||||
(char *)kstr, klen, cb, u);
|
||||
|
||||
return PEM_write_bio_PrivateKey_traditional(bp, x, enc, kstr, klen, cb,
|
||||
u);
|
||||
}
|
||||
|
||||
int
|
||||
PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x,
|
||||
const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb,
|
||||
void *u)
|
||||
{
|
||||
char pem_str[80];
|
||||
|
||||
(void) snprintf(pem_str, sizeof(pem_str), "%s PRIVATE KEY",
|
||||
x->ameth->pem_str);
|
||||
return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey,
|
||||
|
30
externals/libressl/crypto/pem/pem_xaux.c
vendored
30
externals/libressl/crypto/pem/pem_xaux.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pem_xaux.c,v 1.9 2016/09/04 16:10:38 jsing Exp $ */
|
||||
/* $OpenBSD: pem_xaux.c,v 1.10 2021/10/31 16:28:50 tb Exp $ */
|
||||
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
||||
* project 2001.
|
||||
*/
|
||||
@@ -92,31 +92,3 @@ PEM_write_bio_X509_AUX(BIO *bp, X509 *x)
|
||||
return PEM_ASN1_write_bio((i2d_of_void *)i2d_X509_AUX, PEM_STRING_X509_TRUSTED, bp,
|
||||
x, NULL, NULL, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
X509_CERT_PAIR *
|
||||
PEM_read_X509_CERT_PAIR(FILE *fp, X509_CERT_PAIR **x, pem_password_cb *cb, void *u)
|
||||
{
|
||||
return PEM_ASN1_read((d2i_of_void *)d2i_X509_CERT_PAIR, PEM_STRING_X509_PAIR, fp,
|
||||
(void **)x, cb, u);
|
||||
}
|
||||
|
||||
int
|
||||
PEM_write_X509_CERT_PAIR(FILE *fp, X509_CERT_PAIR *x)
|
||||
{
|
||||
return PEM_ASN1_write((i2d_of_void *)i2d_X509_CERT_PAIR, PEM_STRING_X509_PAIR, fp,
|
||||
x, NULL, NULL, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
X509_CERT_PAIR *
|
||||
PEM_read_bio_X509_CERT_PAIR(BIO *bp, X509_CERT_PAIR **x, pem_password_cb *cb, void *u)
|
||||
{
|
||||
return PEM_ASN1_read_bio((d2i_of_void *)d2i_X509_CERT_PAIR, PEM_STRING_X509_PAIR, bp,
|
||||
(void **)x, cb, u);
|
||||
}
|
||||
|
||||
int
|
||||
PEM_write_bio_X509_CERT_PAIR(BIO *bp, X509_CERT_PAIR *x)
|
||||
{
|
||||
return PEM_ASN1_write_bio((i2d_of_void *)i2d_X509_CERT_PAIR, PEM_STRING_X509_PAIR, bp,
|
||||
x, NULL, NULL, 0, NULL, NULL);
|
||||
}
|
||||
|
5
externals/libressl/crypto/pem/pvkfmt.c
vendored
5
externals/libressl/crypto/pem/pvkfmt.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pvkfmt.c,v 1.22 2019/07/08 11:56:18 inoguchi Exp $ */
|
||||
/* $OpenBSD: pvkfmt.c,v 1.25 2022/01/07 09:55:31 tb Exp $ */
|
||||
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
||||
* project 2005.
|
||||
*/
|
||||
@@ -74,6 +74,9 @@
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
#include "bn_lcl.h"
|
||||
#include "dsa_locl.h"
|
||||
#include "evp_locl.h"
|
||||
#include "rsa_locl.h"
|
||||
|
||||
/* Utility function: read a DWORD (4 byte unsigned integer) in little endian
|
||||
* format
|
||||
|
Reference in New Issue
Block a user