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 43174f7..36248df 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 24e0f38..6fa1428 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 3655bf5..fcf6de9 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);