Commit 5e4430e7 authored by Ben Laurie's avatar Ben Laurie
Browse files

More size_tification.

parent 4d6e1e4f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -65,11 +65,12 @@ int ASN1_PRINTABLE_type(const unsigned char *s, size_t len)
	int c;
	int ia5=0;
	int t61=0;
	int ignore_len = 0;

	if (len <= 0) len= -1;
	if (len == 0) ignore_len = 1;
	if (s == NULL) return(V_ASN1_PRINTABLESTRING);

	while ((*s) && (len-- != 0))
	while (*s && !ignore_len && len-- != 0)
		{
		c= *(s++);
#ifndef CHARSET_EBCDIC
+5 −5
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@
typedef struct
    {
    unsigned char *pbData;
    int cbData;
    size_t cbData;
    } MYBLOB;

/* SetBlobCmp
@@ -85,11 +85,11 @@ static int SetBlobCmp(const void *elem1, const void *elem2 )
    }

/* int is_set:  if TRUE, then sort the contents (i.e. it isn't a SEQUENCE)    */
int i2d_ASN1_SET(STACK_OF(BLOCK) *a, unsigned char **pp,
size_t i2d_ASN1_SET(STACK_OF(BLOCK) *a, unsigned char **pp,
		    i2d_of_void *i2d, int ex_tag, int ex_class,
		    int is_set)
	{
	int ret=0,r;
	size_t ret=0,r;
	int i;
	unsigned char *p;
        unsigned char *pStart, *pTempMem;
+2 −2
Original line number Diff line number Diff line
@@ -416,7 +416,7 @@ void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,

void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
		int (*param_decode)(EVP_PKEY *pkey,
				const unsigned char **pder, int derlen),
				    const unsigned char **pder, size_t derlen),
		int (*param_encode)(const EVP_PKEY *pkey, unsigned char **pder),
		int (*param_missing)(const EVP_PKEY *pk),
		int (*param_copy)(EVP_PKEY *to, const EVP_PKEY *from),
+7 −7
Original line number Diff line number Diff line
@@ -310,12 +310,12 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
	DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name)

#define	DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \
	type *d2i_##name(type **a, const unsigned char **in, long len); \
	type *d2i_##name(type **a, const unsigned char **in, size_t len); \
	int i2d_##name(type *a, unsigned char **out); \
	DECLARE_ASN1_ITEM(itname)

#define	DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \
	type *d2i_##name(type **a, const unsigned char **in, long len); \
	type *d2i_##name(type **a, const unsigned char **in, size_t len); \
	int i2d_##name(const type *a, unsigned char **out); \
	DECLARE_ASN1_ITEM(name)

@@ -337,7 +337,7 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
	int fname##_print_ctx(BIO *out, stname *x, int indent, \
					 const ASN1_PCTX *pctx);

#define D2I_OF(type) type *(*)(type **,const unsigned char **,long)
#define D2I_OF(type) type *(*)(type **,const unsigned char **,size_t)
#define I2D_OF(type) int (*)(type *,unsigned char **)
#define I2D_OF_const(type) int (*)(const type *,unsigned char **)

@@ -352,7 +352,7 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
#define CHECKED_PPTR_OF(type, p) \
    ((void**) (1 ? p : (type**)0))

#define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long)
#define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,size_t)
#define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(type *,unsigned char **)
#define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type)

@@ -887,7 +887,7 @@ ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s,time_t t,
int ASN1_TIME_check(ASN1_TIME *t);
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out);

int i2d_ASN1_SET(STACK_OF(BLOCK) *a, unsigned char **pp,
size_t i2d_ASN1_SET(STACK_OF(BLOCK) *a, unsigned char **pp,
		    i2d_of_void *i2d, int ex_tag, int ex_class,
		    int is_set);
STACK_OF(BLOCK) *d2i_ASN1_SET(STACK_OF(BLOCK) **a, const unsigned char **pp,
+1 −1
Original line number Diff line number Diff line
@@ -315,7 +315,7 @@ int asn1_const_Finish(ASN1_const_CTX *c)
	return _asn1_Finish(c);
	}

int asn1_GetSequence(ASN1_const_CTX *c, long *length)
int asn1_GetSequence(ASN1_const_CTX *c, size_t *length)
	{
	const unsigned char *q;

Loading