@@ -1083,9 +1083,9 @@ DECLARE_ASN1_ITEM(ASN1_INTEGER)
1083
1083
// on success and zero on error.
1084
1084
OPENSSL_EXPORT int ASN1_INTEGER_set_uint64 (ASN1_INTEGER * out , uint64_t v );
1085
1085
1086
- // ASN1_INTEGER_set sets |a| to an INTEGER with value |v|. It returns one on
1087
- // success and zero on error.
1088
- OPENSSL_EXPORT int ASN1_INTEGER_set (ASN1_INTEGER * a , long v );
1086
+ // ASN1_INTEGER_set_int64 sets |a| to an INTEGER with value |v|. It returns one
1087
+ // on success and zero on error.
1088
+ OPENSSL_EXPORT int ASN1_INTEGER_set_int64 (ASN1_INTEGER * out , int64_t v );
1089
1089
1090
1090
// ASN1_INTEGER_get_uint64 converts |a| to a |uint64_t|. On success, it returns
1091
1091
// one and sets |*out| to the result. If |a| did not fit or has the wrong type,
@@ -1098,13 +1098,6 @@ OPENSSL_EXPORT int ASN1_INTEGER_get_uint64(uint64_t *out,
1098
1098
// it returns zero.
1099
1099
OPENSSL_EXPORT int ASN1_INTEGER_get_int64 (int64_t * out , const ASN1_INTEGER * a );
1100
1100
1101
- // ASN1_INTEGER_get returns the value of |a| as a |long|, or -1 if |a| is out of
1102
- // range or the wrong type.
1103
- //
1104
- // WARNING: This function's return value cannot distinguish errors from -1.
1105
- // Prefer |ASN1_INTEGER_get_uint64|.
1106
- OPENSSL_EXPORT long ASN1_INTEGER_get (const ASN1_INTEGER * a );
1107
-
1108
1101
// BN_to_ASN1_INTEGER sets |ai| to an INTEGER with value |bn| and returns |ai|
1109
1102
// on success or NULL or error. If |ai| is NULL, it returns a newly-allocated
1110
1103
// |ASN1_INTEGER| on success instead, which the caller must release with
@@ -1152,9 +1145,9 @@ DECLARE_ASN1_ITEM(ASN1_ENUMERATED)
1152
1145
// returns one on success and zero on error.
1153
1146
OPENSSL_EXPORT int ASN1_ENUMERATED_set_uint64 (ASN1_ENUMERATED * out , uint64_t v );
1154
1147
1155
- // ASN1_ENUMERATED_set sets |a| to an ENUMERATED with value |v|. It returns one
1156
- // on success and zero on error.
1157
- OPENSSL_EXPORT int ASN1_ENUMERATED_set (ASN1_ENUMERATED * a , long v );
1148
+ // ASN1_ENUMERATED_set_int64 sets |a| to an ENUMERATED with value |v|. It
1149
+ // returns one on success and zero on error.
1150
+ OPENSSL_EXPORT int ASN1_ENUMERATED_set_int64 (ASN1_ENUMERATED * out , int64_t v );
1158
1151
1159
1152
// ASN1_ENUMERATED_get_uint64 converts |a| to a |uint64_t|. On success, it
1160
1153
// returns one and sets |*out| to the result. If |a| did not fit or has the
@@ -1168,13 +1161,6 @@ OPENSSL_EXPORT int ASN1_ENUMERATED_get_uint64(uint64_t *out,
1168
1161
OPENSSL_EXPORT int ASN1_ENUMERATED_get_int64 (int64_t * out ,
1169
1162
const ASN1_ENUMERATED * a );
1170
1163
1171
- // ASN1_ENUMERATED_get returns the value of |a| as a |long|, or -1 if |a| is out
1172
- // of range or the wrong type.
1173
- //
1174
- // WARNING: This function's return value cannot distinguish errors from -1.
1175
- // Prefer |ASN1_ENUMERATED_get_uint64|.
1176
- OPENSSL_EXPORT long ASN1_ENUMERATED_get (const ASN1_ENUMERATED * a );
1177
-
1178
1164
// BN_to_ASN1_ENUMERATED sets |ai| to an ENUMERATED with value |bn| and returns
1179
1165
// |ai| on success or NULL or error. If |ai| is NULL, it returns a
1180
1166
// newly-allocated |ASN1_ENUMERATED| on success instead, which the caller must
@@ -1977,6 +1963,32 @@ OPENSSL_EXPORT int i2d_ASN1_PRINTABLE(const ASN1_STRING *in, uint8_t **outp);
1977
1963
// printable characters. See https://crbug.com/boringssl/412.
1978
1964
DECLARE_ASN1_ITEM (ASN1_PRINTABLE )
1979
1965
1966
+ // ASN1_INTEGER_set sets |a| to an INTEGER with value |v|. It returns one on
1967
+ // success and zero on error.
1968
+ //
1969
+ // Use |ASN1_INTEGER_set_uint64| and |ASN1_INTEGER_set_int64| instead.
1970
+ OPENSSL_EXPORT int ASN1_INTEGER_set (ASN1_INTEGER * a , long v );
1971
+
1972
+ // ASN1_ENUMERATED_set sets |a| to an ENUMERATED with value |v|. It returns one
1973
+ // on success and zero on error.
1974
+ //
1975
+ // Use |ASN1_ENUMERATED_set_uint64| and |ASN1_ENUMERATED_set_int64| instead.
1976
+ OPENSSL_EXPORT int ASN1_ENUMERATED_set (ASN1_ENUMERATED * a , long v );
1977
+
1978
+ // ASN1_INTEGER_get returns the value of |a| as a |long|, or -1 if |a| is out of
1979
+ // range or the wrong type.
1980
+ //
1981
+ // WARNING: This function's return value cannot distinguish errors from -1.
1982
+ // Use |ASN1_INTEGER_get_uint64| and |ASN1_INTEGER_get_int64| instead.
1983
+ OPENSSL_EXPORT long ASN1_INTEGER_get (const ASN1_INTEGER * a );
1984
+
1985
+ // ASN1_ENUMERATED_get returns the value of |a| as a |long|, or -1 if |a| is out
1986
+ // of range or the wrong type.
1987
+ //
1988
+ // WARNING: This function's return value cannot distinguish errors from -1.
1989
+ // Use |ASN1_ENUMERATED_get_uint64| and |ASN1_ENUMERATED_get_int64| instead.
1990
+ OPENSSL_EXPORT long ASN1_ENUMERATED_get (const ASN1_ENUMERATED * a );
1991
+
1980
1992
1981
1993
#if defined(__cplusplus )
1982
1994
} // extern C
0 commit comments