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

make ASN1_OBJECT opaque

parent 7b68c30d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@
#include <openssl/asn1.h>
#include <openssl/objects.h>
#include <openssl/bn.h>
#include "internal/asn1_int.h"

int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp)
{
+0 −16
Original line number Diff line number Diff line
@@ -194,22 +194,6 @@ typedef struct asn1_const_ctx_st {
    int line;                   /* used in error processing */
} ASN1_const_CTX;

/*
 * These are used internally in the ASN1_OBJECT to keep track of whether the
 * names and data need to be free()ed
 */
# define ASN1_OBJECT_FLAG_DYNAMIC         0x01/* internal use */
# define ASN1_OBJECT_FLAG_CRITICAL        0x02/* critical x509v3 object id */
# define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04/* internal use */
# define ASN1_OBJECT_FLAG_DYNAMIC_DATA    0x08/* internal use */
struct asn1_object_st {
    const char *sn, *ln;
    int nid;
    int length;
    const unsigned char *data;  /* data remains const after init */
    int flags;                  /* Should we free this one */
};

# define ASN1_STRING_FLAG_BITS_LEFT 0x08/* Set if 0x07 has bits left value */
/*
 * This indicates that the ASN1_STRING is not a real value but just a place
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@
#include <openssl/conf.h>
#include <openssl/dso.h>
#include <openssl/x509.h>
#include "internal/asn1_int.h"

/* Simple ASN1 OID module: add all objects in a given section */

+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/objects.h>
#include "internal/asn1_int.h"

static int asn1_i2d_ex_primitive(ASN1_VALUE **pval, unsigned char **out,
                                 const ASN1_ITEM *it, int tag, int aclass);
+1 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ int EVP_CIPHER_type(const EVP_CIPHER *ctx)
    default:
        /* Check it has an OID and it is valid */
        otmp = OBJ_nid2obj(nid);
        if (!otmp || !otmp->data)
        if (OBJ_get0_data(otmp) == NULL)
            nid = NID_undef;
        ASN1_OBJECT_free(otmp);
        return nid;
Loading