Constify ASN1_INTEGER_get, ASN1_ENUMERATED_get
authorFdaSilvaYY <fdasilvayy@gmail.com>
Mon, 4 Jul 2016 18:40:27 +0000 (20:40 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 4 Aug 2016 15:02:48 +0000 (17:02 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/asn1/a_int.c
doc/crypto/ASN1_INTEGER_get_int64.pod
include/openssl/asn1.h

index 43174f7165270cd82a105a075d9711542205eb3b..36248df92d8a8301f5286dd086ac07385022ab3e 100644 (file)
@@ -595,7 +595,7 @@ int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v)
     return ASN1_ENUMERATED_set_int64(a, v);
 }
 
-long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a)
+long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a)
 {
     int i;
     int64_t r;
index 24e0f3800355b468614451be3f2a5c46f496c265..6fa1428c4212edd3cf179c5610329b4e2c113d7b 100644 (file)
@@ -10,7 +10,7 @@ ASN1_INTEGER_get_int64, ASN1_INTEGER_get, ASN1_INTEGER_set_int64, ASN1_INTEGER_s
  #include <openssl/asn1.h>
 
  int ASN1_INTEGER_get_int64(int64_t *pr, const ASN1_INTEGER *a);
- int ASN1_INTEGER_get(ASN1_INTEGER *a, long v);
+ int ASN1_INTEGER_get(const ASN1_INTEGER *a, long v);
 
  int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r);
  long ASN1_INTEGER_set(const ASN1_INTEGER *a);
@@ -22,7 +22,7 @@ ASN1_INTEGER_get_int64, ASN1_INTEGER_get, ASN1_INTEGER_set_int64, ASN1_INTEGER_s
  BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
 
  int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_INTEGER *a);
- long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
+ long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
 
  int ASN1_ENUMERATED_set_int64(ASN1_INTEGER *a, int64_t r);
  int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
index 3655bf5c605fe294f8755c303646efdbd89ebb23..fcf6de99670438ef82cb940f5b63bc1cbfd510bf 100644 (file)
@@ -656,7 +656,7 @@ int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r);
 
 
 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
-long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
+long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai);
 BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn);