diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c index 4cca7a09e3045618075f1d07d852b3c507563e3e..463469d188bc5536809873c021a00105ee1a2d95 100644 --- a/crypto/asn1/a_object.c +++ b/crypto/asn1/a_object.c @@ -17,7 +17,7 @@ #include "internal/asn1_int.h" #include "asn1_locl.h" -int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp) +int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **pp) { unsigned char *p; int objsize; @@ -161,12 +161,12 @@ int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num) return (0); } -int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a) +int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a) { return OBJ_obj2txt(buf, buf_len, a, 0); } -int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a) +int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a) { char buf[80], *p = buf; int i; diff --git a/doc/crypto/OBJ_nid2obj.pod b/doc/crypto/OBJ_nid2obj.pod index 02e81bad34df7de7675aa9584dc0e18d1c2bcd72..3ada6679cf92b7d47e68e1532a562cdaa7a4ebbb 100644 --- a/doc/crypto/OBJ_nid2obj.pod +++ b/doc/crypto/OBJ_nid2obj.pod @@ -25,7 +25,7 @@ OBJ_dup, OBJ_txt2obj, OBJ_obj2txt, OBJ_create, OBJ_cleanup ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name); int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name); - int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a); + int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a); int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b); ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o); diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h index 03fc21e7d56a53eabb5176a65fe33eb1fdd6883a..3655bf5c605fe294f8755c303646efdbd89ebb23 100644 --- a/include/openssl/asn1.h +++ b/include/openssl/asn1.h @@ -526,7 +526,7 @@ void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t); ASN1_OBJECT *ASN1_OBJECT_new(void); void ASN1_OBJECT_free(ASN1_OBJECT *a); -int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp); +int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **pp); ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long length); @@ -632,10 +632,10 @@ int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a); int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size); int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a); int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size); -int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a); +int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a); int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size); int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type); -int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a); +int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a); int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num); ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,