Lines Matching refs:ret

25     int neg, ret;  in ASN1_INTEGER_cmp()  local
35 ret = ASN1_STRING_cmp(x, y); in ASN1_INTEGER_cmp()
38 return -ret; in ASN1_INTEGER_cmp()
40 return ret; in ASN1_INTEGER_cmp()
101 size_t ret, i; in i2c_ibuf() local
105 ret = blen; in i2c_ibuf()
125 ret += pad; in i2c_ibuf()
127 ret = 1; in i2c_ibuf()
132 return ret; in i2c_ibuf()
144 *pp += ret; in i2c_ibuf()
145 return ret; in i2c_ibuf()
289 ASN1_INTEGER *ret = NULL; in ossl_c2i_ASN1_INTEGER() local
299 ret = ASN1_INTEGER_new(); in ossl_c2i_ASN1_INTEGER()
300 if (ret == NULL) in ossl_c2i_ASN1_INTEGER()
302 ret->type = V_ASN1_INTEGER; in ossl_c2i_ASN1_INTEGER()
304 ret = *a; in ossl_c2i_ASN1_INTEGER()
306 if (ASN1_STRING_set(ret, NULL, r) == 0) { in ossl_c2i_ASN1_INTEGER()
311 c2i_ibuf(ret->data, &neg, *pp, len); in ossl_c2i_ASN1_INTEGER()
314 ret->type |= V_ASN1_NEG; in ossl_c2i_ASN1_INTEGER()
316 ret->type &= ~V_ASN1_NEG; in ossl_c2i_ASN1_INTEGER()
320 (*a) = ret; in ossl_c2i_ASN1_INTEGER()
321 return ret; in ossl_c2i_ASN1_INTEGER()
323 if (a == NULL || *a != ret) in ossl_c2i_ASN1_INTEGER()
324 ASN1_INTEGER_free(ret); in ossl_c2i_ASN1_INTEGER()
399 ASN1_INTEGER *ret = NULL; in d2i_ASN1_UINTEGER() local
407 if ((ret = ASN1_INTEGER_new()) == NULL) in d2i_ASN1_UINTEGER()
409 ret->type = V_ASN1_INTEGER; in d2i_ASN1_UINTEGER()
411 ret = (*a); in d2i_ASN1_UINTEGER()
436 ret->type = V_ASN1_INTEGER; in d2i_ASN1_UINTEGER()
446 ASN1_STRING_set0(ret, s, (int)len); in d2i_ASN1_UINTEGER()
448 (*a) = ret; in d2i_ASN1_UINTEGER()
450 return ret; in d2i_ASN1_UINTEGER()
454 if ((a == NULL) || (*a != ret)) in d2i_ASN1_UINTEGER()
455 ASN1_INTEGER_free(ret); in d2i_ASN1_UINTEGER()
462 ASN1_INTEGER *ret; in bn_to_asn1_string() local
466 ret = ASN1_STRING_type_new(atype); in bn_to_asn1_string()
468 ret = ai; in bn_to_asn1_string()
469 ret->type = atype; in bn_to_asn1_string()
472 if (ret == NULL) { in bn_to_asn1_string()
478 ret->type |= V_ASN1_NEG_INTEGER; in bn_to_asn1_string()
485 if (ASN1_STRING_set(ret, NULL, len) == 0) { in bn_to_asn1_string()
492 ret->data[0] = 0; in bn_to_asn1_string()
494 len = BN_bn2bin(bn, ret->data); in bn_to_asn1_string()
495 ret->length = len; in bn_to_asn1_string()
496 return ret; in bn_to_asn1_string()
498 if (ret != ai) in bn_to_asn1_string()
499 ASN1_INTEGER_free(ret); in bn_to_asn1_string()
506 BIGNUM *ret; in asn1_string_to_bn() local
513 ret = BN_bin2bn(ai->data, ai->length, bn); in asn1_string_to_bn()
514 if (ret == NULL) { in asn1_string_to_bn()
519 BN_set_negative(ret, 1); in asn1_string_to_bn()
520 return ret; in asn1_string_to_bn()
616 int ossl_c2i_uint64_int(uint64_t *ret, int *neg, in ossl_c2i_uint64_int() argument
630 return asn1_get_uint64(ret, buf, buflen); in ossl_c2i_uint64_int()