diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-03-15 17:26:04 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-03-24 18:35:58 +0100 |
commit | 2e430277578d3dd586cd005682a54a59d6158146 (patch) | |
tree | 4fa3771298d408499873043a3f37f61b2c7746d0 /crypto/objects | |
parent | Configuration file examples. (diff) | |
download | openssl-2e430277578d3dd586cd005682a54a59d6158146.tar.xz openssl-2e430277578d3dd586cd005682a54a59d6158146.zip |
make ASN1_OBJECT opaque
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/objects')
-rw-r--r-- | crypto/objects/obj_dat.c | 15 | ||||
-rw-r--r-- | crypto/objects/obj_lib.c | 1 | ||||
-rw-r--r-- | crypto/objects/objects.h | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index e7366af8dc..5c861d1ec2 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -64,6 +64,7 @@ #include <openssl/asn1.h> #include <openssl/objects.h> #include <openssl/bn.h> +#include "internal/asn1_int.h" /* obj_dat.h is generated from objects.h by obj_dat.pl */ #include "obj_dat.h" @@ -781,3 +782,17 @@ int OBJ_create(const char *oid, const char *sn, const char *ln) OPENSSL_free(buf); return (ok); } + +size_t OBJ_length(const ASN1_OBJECT *obj) +{ + if (obj == NULL) + return 0; + return obj->length; +} + +const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj) +{ + if (obj == NULL) + return NULL; + return obj->data; +} diff --git a/crypto/objects/obj_lib.c b/crypto/objects/obj_lib.c index 8851baffb2..0bcb5df506 100644 --- a/crypto/objects/obj_lib.c +++ b/crypto/objects/obj_lib.c @@ -61,6 +61,7 @@ #include <openssl/lhash.h> #include <openssl/objects.h> #include <openssl/buffer.h> +#include "internal/asn1_int.h" ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o) { diff --git a/crypto/objects/objects.h b/crypto/objects/objects.h index b8dafa89ce..165817fb1a 100644 --- a/crypto/objects/objects.h +++ b/crypto/objects/objects.h @@ -1107,6 +1107,9 @@ int OBJ_create(const char *oid, const char *sn, const char *ln); void OBJ_cleanup(void); int OBJ_create_objects(BIO *in); +size_t OBJ_length(const ASN1_OBJECT *obj); +const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj); + int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); int OBJ_add_sigid(int signid, int dig_id, int pkey_id); |