Lines Matching refs:ret

70 	int neg, ret;  in ASN1_INTEGER_cmp()  local
81 ret = ASN1_STRING_cmp(x, y); in ASN1_INTEGER_cmp()
84 return -ret; in ASN1_INTEGER_cmp()
86 return ret; in ASN1_INTEGER_cmp()
117 int pad=0,ret,i,neg; in i2c_ASN1_INTEGER() local
123 ret=1; in i2c_ASN1_INTEGER()
126 ret=a->length; in i2c_ASN1_INTEGER()
128 if (ret == 1 && i == 0) in i2c_ASN1_INTEGER()
149 ret+=pad; in i2c_ASN1_INTEGER()
151 if (pp == NULL) return(ret); in i2c_ASN1_INTEGER()
175 *pp+=ret; in i2c_ASN1_INTEGER()
176 return(ret); in i2c_ASN1_INTEGER()
184 ASN1_INTEGER *ret=NULL; in c2i_ASN1_INTEGER() local
191 if ((ret=M_ASN1_INTEGER_new()) == NULL) return(NULL); in c2i_ASN1_INTEGER()
192 ret->type=V_ASN1_INTEGER; in c2i_ASN1_INTEGER()
195 ret=(*a); in c2i_ASN1_INTEGER()
213 ret->type=V_ASN1_INTEGER; in c2i_ASN1_INTEGER()
216 ret->type=V_ASN1_NEG_INTEGER; in c2i_ASN1_INTEGER()
246 ret->type=V_ASN1_INTEGER; in c2i_ASN1_INTEGER()
255 if (ret->data != NULL) OPENSSL_free(ret->data); in c2i_ASN1_INTEGER()
256 ret->data=s; in c2i_ASN1_INTEGER()
257 ret->length=(int)len; in c2i_ASN1_INTEGER()
258 if (a != NULL) (*a)=ret; in c2i_ASN1_INTEGER()
260 return(ret); in c2i_ASN1_INTEGER()
263 if ((ret != NULL) && ((a == NULL) || (*a != ret))) in c2i_ASN1_INTEGER()
264 M_ASN1_INTEGER_free(ret); in c2i_ASN1_INTEGER()
277 ASN1_INTEGER *ret=NULL; in d2i_ASN1_UINTEGER() local
286 if ((ret=M_ASN1_INTEGER_new()) == NULL) return(NULL); in d2i_ASN1_UINTEGER()
287 ret->type=V_ASN1_INTEGER; in d2i_ASN1_UINTEGER()
290 ret=(*a); in d2i_ASN1_UINTEGER()
314 ret->type=V_ASN1_INTEGER; in d2i_ASN1_UINTEGER()
325 if (ret->data != NULL) OPENSSL_free(ret->data); in d2i_ASN1_UINTEGER()
326 ret->data=s; in d2i_ASN1_UINTEGER()
327 ret->length=(int)len; in d2i_ASN1_UINTEGER()
328 if (a != NULL) (*a)=ret; in d2i_ASN1_UINTEGER()
330 return(ret); in d2i_ASN1_UINTEGER()
333 if ((ret != NULL) && ((a == NULL) || (*a != ret))) in d2i_ASN1_UINTEGER()
334 M_ASN1_INTEGER_free(ret); in d2i_ASN1_UINTEGER()
409 ASN1_INTEGER *ret; in BN_to_ASN1_INTEGER() local
413 ret=M_ASN1_INTEGER_new(); in BN_to_ASN1_INTEGER()
415 ret=ai; in BN_to_ASN1_INTEGER()
416 if (ret == NULL) in BN_to_ASN1_INTEGER()
422 ret->type = V_ASN1_NEG_INTEGER; in BN_to_ASN1_INTEGER()
423 else ret->type=V_ASN1_INTEGER; in BN_to_ASN1_INTEGER()
426 if (ret->length < len+4) in BN_to_ASN1_INTEGER()
428 unsigned char *new_data=OPENSSL_realloc(ret->data, len+4); in BN_to_ASN1_INTEGER()
434 ret->data=new_data; in BN_to_ASN1_INTEGER()
436 ret->length=BN_bn2bin(bn,ret->data); in BN_to_ASN1_INTEGER()
438 if(!ret->length) in BN_to_ASN1_INTEGER()
440 ret->data[0] = 0; in BN_to_ASN1_INTEGER()
441 ret->length = 1; in BN_to_ASN1_INTEGER()
443 return(ret); in BN_to_ASN1_INTEGER()
445 if (ret != ai) M_ASN1_INTEGER_free(ret); in BN_to_ASN1_INTEGER()
451 BIGNUM *ret; in ASN1_INTEGER_to_BN() local
453 if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL) in ASN1_INTEGER_to_BN()
456 BN_set_negative(ret, 1); in ASN1_INTEGER_to_BN()
457 return(ret); in ASN1_INTEGER_to_BN()