Commit ebc06fba authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Bunch of constifications.

parent e979c039
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -117,8 +117,8 @@ err:

int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d)
	{
	static int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
	static int max[9]={99, 99,12,31,23,59,59,12,59};
	static const int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
	static const int max[9]={99, 99,12,31,23,59,59,12,59};
	char *a;
	int n,i,l,o;

+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,

/* This table must be kept in NID order */

static ASN1_STRING_TABLE tbl_standard[] = {
static const ASN1_STRING_TABLE tbl_standard[] = {
{NID_commonName,		1, ub_common_name, DIRSTRING_TYPE, 0},
{NID_countryName,		2, 2, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
{NID_localityName,		1, ub_locality_name, DIRSTRING_TYPE, 0},
+2 −2
Original line number Diff line number Diff line
@@ -114,8 +114,8 @@ err:

int ASN1_UTCTIME_check(ASN1_UTCTIME *d)
	{
	static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0};
	static int max[8]={99,12,31,23,59,59,12,59};
	static const int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0};
	static const int max[8]={99,12,31,23,59,59,12,59};
	char *a;
	int n,i,l,o;

+1 −1
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ static int append_exp(tag_exp_arg *arg, int exp_tag, int exp_class, int exp_cons
static int asn1_str2tag(const char *tagstr, int len)
	{
	unsigned int i;
	static struct tag_name_st *tntmp, tnst [] = {
	static const struct tag_name_st *tntmp, tnst [] = {
		ASN1_GEN_STR("BOOL", V_ASN1_BOOLEAN),
		ASN1_GEN_STR("BOOLEAN", V_ASN1_BOOLEAN),
		ASN1_GEN_STR("NULL", V_ASN1_NULL),
+1 −1
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ end:

const char *ASN1_tag2str(int tag)
{
	static const char *tag2str[] = {
	static const char * const tag2str[] = {
	 "EOC", "BOOLEAN", "INTEGER", "BIT STRING", "OCTET STRING", /* 0-4 */
	 "NULL", "OBJECT", "OBJECT DESCRIPTOR", "EXTERNAL", "REAL", /* 5-9 */
	 "ENUMERATED", "<ASN1 11>", "UTF8STRING", "<ASN1 13>", 	    /* 10-13 */
Loading