Lines Matching refs:bn
459 static ASN1_STRING *bn_to_asn1_string(const BIGNUM *bn, ASN1_STRING *ai, in bn_to_asn1_string() argument
477 if (BN_is_negative(bn) && !BN_is_zero(bn)) in bn_to_asn1_string()
480 len = BN_num_bytes(bn); in bn_to_asn1_string()
491 if (BN_is_zero(bn)) in bn_to_asn1_string()
494 len = BN_bn2bin(bn, ret->data); in bn_to_asn1_string()
503 static BIGNUM *asn1_string_to_bn(const ASN1_INTEGER *ai, BIGNUM *bn, in asn1_string_to_bn() argument
513 ret = BN_bin2bn(ai->data, ai->length, bn); in asn1_string_to_bn()
562 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai) in BN_to_ASN1_INTEGER() argument
564 return bn_to_asn1_string(bn, ai, V_ASN1_INTEGER); in BN_to_ASN1_INTEGER()
567 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn) in ASN1_INTEGER_to_BN() argument
569 return asn1_string_to_bn(ai, bn, V_ASN1_INTEGER); in ASN1_INTEGER_to_BN()
605 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai) in BN_to_ASN1_ENUMERATED() argument
607 return bn_to_asn1_string(bn, ai, V_ASN1_ENUMERATED); in BN_to_ASN1_ENUMERATED()
610 BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn) in ASN1_ENUMERATED_to_BN() argument
612 return asn1_string_to_bn(ai, bn, V_ASN1_ENUMERATED); in ASN1_ENUMERATED_to_BN()