Commit e3e57192 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

make X509_CRL opaque



Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
parent cf170f55
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -358,8 +358,13 @@ int crl_main(int argc, char **argv)
        goto end;
    }

    if (badsig)
        x->signature->data[x->signature->length - 1] ^= 0x1;
    if (badsig) {
        ASN1_BIT_STRING *sig;
        unsigned char *psig;
        X509_CRL_get0_signature(&sig, NULL, x);
        psig = ASN1_STRING_data(sig);
        psig[ASN1_STRING_length(sig) - 1] ^= 0x1;
    }

    if (outformat == FORMAT_ASN1)
        i = (int)i2d_X509_CRL_bio(out, x);
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@
#include <openssl/bn.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include "internal/x509_int.h"
#include <openssl/x509v3.h>

#ifndef OPENSSL_NO_STDIO
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@
#include <openssl/asn1t.h>
#include "asn1_locl.h"
#include <openssl/x509.h>
#include "internal/x509_int.h"
#include <openssl/x509v3.h>

static int X509_REVOKED_cmp(const X509_REVOKED *const *a,
+33 −0
Original line number Diff line number Diff line
@@ -105,3 +105,36 @@ struct X509_req_st {
    ASN1_BIT_STRING *signature;
    int references;
};

struct X509_crl_info_st {
    ASN1_INTEGER *version;
    X509_ALGOR *sig_alg;
    X509_NAME *issuer;
    ASN1_TIME *lastUpdate;
    ASN1_TIME *nextUpdate;
    STACK_OF(X509_REVOKED) *revoked;
    STACK_OF(X509_EXTENSION) /* [0] */ *extensions;
    ASN1_ENCODING enc;
};

struct X509_crl_st {
    /* actual signature */
    X509_CRL_INFO *crl;
    X509_ALGOR *sig_alg;
    ASN1_BIT_STRING *signature;
    int references;
    int flags;
    /* Copies of various extensions */
    AUTHORITY_KEYID *akid;
    ISSUING_DIST_POINT *idp;
    /* Convenient breakdown of IDP */
    int idp_flags;
    int idp_reasons;
    /* CRL and base CRL numbers for delta processing */
    ASN1_INTEGER *crl_number;
    ASN1_INTEGER *base_crl_number;
    unsigned char sha1_hash[SHA_DIGEST_LENGTH];
    STACK_OF(GENERAL_NAMES) *issuers;
    const X509_CRL_METHOD *meth;
    void *meth_data;
};
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@

#include <openssl/lhash.h>
#include <openssl/x509.h>
#include "internal/x509_int.h"

typedef struct lookup_dir_hashes_st {
    unsigned long hash;
Loading