mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
Fix safestack issues in pkcs7.h
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12781)
This commit is contained in:
parent
fd3ed85c67
commit
02199cc39d
1
.gitignore
vendored
1
.gitignore
vendored
@ -29,6 +29,7 @@
|
||||
/include/openssl/fipskey.h
|
||||
/include/openssl/ocsp.h
|
||||
/include/openssl/opensslv.h
|
||||
/include/openssl/pkcs7.h
|
||||
/include/openssl/safestack.h
|
||||
/include/openssl/ssl.h
|
||||
/include/openssl/x509.h
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <openssl/pkcs12.h>
|
||||
#include <openssl/provider.h>
|
||||
|
||||
DEFINE_STACK_OF(PKCS7)
|
||||
DEFINE_STACK_OF(PKCS12_SAFEBAG)
|
||||
|
||||
#define NOKEYS 0x1
|
||||
|
@ -20,6 +20,7 @@ DEPEND[]=include/openssl/asn1.h \
|
||||
include/openssl/fipskey.h \
|
||||
include/openssl/opensslv.h \
|
||||
include/openssl/ocsp.h \
|
||||
include/openssl/pkcs7.h \
|
||||
include/openssl/safestack.h \
|
||||
include/openssl/ssl.h \
|
||||
include/openssl/x509.h \
|
||||
@ -34,6 +35,7 @@ GENERATE[include/openssl/cms.h]=include/openssl/cms.h.in
|
||||
GENERATE[include/openssl/fipskey.h]=include/openssl/fipskey.h.in
|
||||
GENERATE[include/openssl/ocsp.h]=include/openssl/ocsp.h.in
|
||||
GENERATE[include/openssl/opensslv.h]=include/openssl/opensslv.h.in
|
||||
GENERATE[include/openssl/pkcs7.h]=include/openssl/pkcs7.h.in
|
||||
GENERATE[include/openssl/safestack.h]=include/openssl/safestack.h.in
|
||||
GENERATE[include/openssl/ssl.h]=include/openssl/ssl.h.in
|
||||
GENERATE[include/openssl/x509.h]=include/openssl/x509.h.in
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include <openssl/pkcs12.h>
|
||||
#include "p12_local.h"
|
||||
|
||||
DEFINE_STACK_OF(PKCS7)
|
||||
DEFINE_STACK_OF(PKCS12_SAFEBAG)
|
||||
|
||||
static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags,
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include <openssl/pkcs12.h>
|
||||
#include "crypto/x509.h" /* for X509_add_cert_new() */
|
||||
|
||||
DEFINE_STACK_OF(PKCS7)
|
||||
DEFINE_STACK_OF(PKCS12_SAFEBAG)
|
||||
|
||||
/* Simplified PKCS#12 routines */
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include <openssl/pkcs12.h>
|
||||
#include "p12_local.h"
|
||||
|
||||
DEFINE_STACK_OF(PKCS7)
|
||||
DEFINE_STACK_OF(PKCS12_SAFEBAG)
|
||||
|
||||
/* PKCS#12 password change routine */
|
||||
|
@ -16,9 +16,6 @@
|
||||
#include <openssl/err.h>
|
||||
#include "pk7_local.h"
|
||||
|
||||
DEFINE_STACK_OF(PKCS7_RECIP_INFO)
|
||||
DEFINE_STACK_OF(PKCS7_SIGNER_INFO)
|
||||
|
||||
static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype,
|
||||
void *value);
|
||||
static ASN1_TYPE *get_attribute(STACK_OF(X509_ATTRIBUTE) *sk, int nid);
|
||||
|
@ -16,9 +16,6 @@
|
||||
#include "crypto/x509.h" /* for sk_X509_add1_cert() */
|
||||
#include "pk7_local.h"
|
||||
|
||||
DEFINE_STACK_OF(PKCS7_RECIP_INFO)
|
||||
DEFINE_STACK_OF(PKCS7_SIGNER_INFO)
|
||||
|
||||
long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg)
|
||||
{
|
||||
int nid;
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#define BUFFERSIZE 4096
|
||||
|
||||
DEFINE_STACK_OF(PKCS7_SIGNER_INFO)
|
||||
|
||||
static int pkcs7_copy_existing_digest(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "ts_local.h"
|
||||
#include "crypto/ess.h"
|
||||
|
||||
DEFINE_STACK_OF(PKCS7_SIGNER_INFO)
|
||||
DEFINE_STACK_OF(ESS_CERT_ID)
|
||||
DEFINE_STACK_OF(ESS_CERT_ID_V2)
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
/*
|
||||
* {- join("\n * ", @autowarntext) -}
|
||||
*
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
@ -7,6 +9,10 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
{-
|
||||
use OpenSSL::stackhash qw(generate_stack_macros);
|
||||
-}
|
||||
|
||||
#ifndef OPENSSL_PKCS7_H
|
||||
# define OPENSSL_PKCS7_H
|
||||
# pragma once
|
||||
@ -58,7 +64,9 @@ typedef struct pkcs7_signer_info_st {
|
||||
EVP_PKEY *pkey;
|
||||
const PKCS7_CTX *ctx;
|
||||
} PKCS7_SIGNER_INFO;
|
||||
DEFINE_OR_DECLARE_STACK_OF(PKCS7_SIGNER_INFO)
|
||||
{-
|
||||
generate_stack_macros("PKCS7_SIGNER_INFO");
|
||||
-}
|
||||
|
||||
typedef struct pkcs7_recip_info_st {
|
||||
ASN1_INTEGER *version; /* version 0 */
|
||||
@ -68,7 +76,9 @@ typedef struct pkcs7_recip_info_st {
|
||||
X509 *cert; /* get the pub-key from this */
|
||||
const PKCS7_CTX *ctx;
|
||||
} PKCS7_RECIP_INFO;
|
||||
DEFINE_OR_DECLARE_STACK_OF(PKCS7_RECIP_INFO)
|
||||
{-
|
||||
generate_stack_macros("PKCS7_RECIP_INFO");
|
||||
-}
|
||||
|
||||
|
||||
typedef struct pkcs7_signed_st {
|
||||
@ -157,7 +167,9 @@ typedef struct pkcs7_st {
|
||||
} d;
|
||||
PKCS7_CTX ctx;
|
||||
} PKCS7;
|
||||
DEFINE_OR_DECLARE_STACK_OF(PKCS7)
|
||||
{-
|
||||
generate_stack_macros("PKCS7");
|
||||
-}
|
||||
|
||||
|
||||
# define PKCS7_OP_SET_DETACHED_SIGNATURE 1
|
@ -21,7 +21,6 @@
|
||||
#include "testutil.h"
|
||||
#include "pkcs12_helper.h"
|
||||
|
||||
DEFINE_STACK_OF(PKCS7)
|
||||
DEFINE_STACK_OF(PKCS12_SAFEBAG)
|
||||
|
||||
/* Set this to > 0 write test data to file */
|
||||
|
Loading…
Reference in New Issue
Block a user