Clarify OBJ_get0_data and OBJ_get_length.

Someone asked me about this API and I realized it didn't clarify what
DER representation.

Change-Id: I3c53df200612dd5a8269a14dd04e7b430cd96389
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/47124
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
grpc-202302
David Benjamin 4 years ago committed by CQ bot account: commit-bot@chromium.org
parent c5dc2781b1
commit 354cd48f51
  1. 10
      include/openssl/obj.h

@ -91,10 +91,16 @@ OPENSSL_EXPORT ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *obj);
// less than, equal to or greater than |b|, respectively.
OPENSSL_EXPORT int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
// OBJ_get0_data returns a pointer to the DER representation of |obj|.
// OBJ_get0_data returns a pointer to the DER representation of |obj|. This is
// the contents of the DER-encoded identifier, not including the tag and length.
// If |obj| does not have an associated object identifier (i.e. it is a nid-only
// value), this value is the empty string.
OPENSSL_EXPORT const uint8_t *OBJ_get0_data(const ASN1_OBJECT *obj);
// OBJ_length returns the length of the DER representation of |obj|.
// OBJ_length returns the length of the DER representation of |obj|. This is the
// contents of the DER-encoded identifier, not including the tag and length. If
// |obj| does not have an associated object identifier (i.e. it is a nid-only
// value), this value is the empty string.
OPENSSL_EXPORT size_t OBJ_length(const ASN1_OBJECT *obj);

Loading…
Cancel
Save