Lines Matching refs:tpmPublic
59 const TPMT_PUBLIC *tpmPublic, in ifapi_get_profile_sig_scheme() argument
64 return_if_null(tpmPublic, "tpmPublic is NULL", TSS2_FAPI_RC_BAD_REFERENCE); in ifapi_get_profile_sig_scheme()
69 if (tpmPublic->type == TPM2_ALG_RSA) { in ifapi_get_profile_sig_scheme()
72 } else if (tpmPublic->type == TPM2_ALG_ECC) { in ifapi_get_profile_sig_scheme()
697 const TPMT_PUBLIC *tpmPublic, in ifapi_der_sig_to_tpm() argument
704 return_if_null(tpmPublic, "tpmPublic is NULL", TSS2_FAPI_RC_BAD_REFERENCE); in ifapi_der_sig_to_tpm()
709 if (tpmPublic->type == TPM2_ALG_RSA) { in ifapi_der_sig_to_tpm()
710 if (tpmPublic->parameters.rsaDetail.scheme.scheme == TPM2_ALG_RSAPSS) { in ifapi_der_sig_to_tpm()
716 } else if (tpmPublic->parameters.rsaDetail.scheme.scheme == TPM2_ALG_RSASSA) { in ifapi_der_sig_to_tpm()
726 } else if (tpmPublic->type == TPM2_ALG_ECC) { in ifapi_der_sig_to_tpm()
728 tpmPublic->unique.ecc.x.size, hashAlgorithm, in ifapi_der_sig_to_tpm()
906 TPM2B_PUBLIC *tpmPublic) in get_rsa_tpm2b_public_from_evp() argument
910 return_if_null(tpmPublic, "tpmPublic is NULL", TSS2_FAPI_RC_BAD_REFERENCE); in get_rsa_tpm2b_public_from_evp()
925 tpmPublic->publicArea.unique.rsa.size = rsaKeySize; in get_rsa_tpm2b_public_from_evp()
926 if (1 != ifapi_bn2binpad(n, &tpmPublic->publicArea.unique.rsa.buffer[0], in get_rsa_tpm2b_public_from_evp()
931 tpmPublic->publicArea.parameters.rsaDetail.keyBits = rsaKeySize * 8; in get_rsa_tpm2b_public_from_evp()
932 tpmPublic->publicArea.parameters.rsaDetail.exponent = BN_get_word(e); in get_rsa_tpm2b_public_from_evp()
958 TPM2B_PUBLIC *tpmPublic) in get_ecc_tpm2b_public_from_evp() argument
962 return_if_null(tpmPublic, "tpmPublic is NULL", TSS2_FAPI_RC_BAD_REFERENCE); in get_ecc_tpm2b_public_from_evp()
985 tpmPublic->publicArea.unique.ecc.x.size = ecKeySize; in get_ecc_tpm2b_public_from_evp()
986 tpmPublic->publicArea.unique.ecc.y.size = ecKeySize; in get_ecc_tpm2b_public_from_evp()
1001 if (1 != ifapi_bn2binpad(bnX, &tpmPublic->publicArea.unique.ecc.x.buffer[0], in get_ecc_tpm2b_public_from_evp()
1006 if (1 != ifapi_bn2binpad(bnY, &tpmPublic->publicArea.unique.ecc.y.buffer[0], in get_ecc_tpm2b_public_from_evp()
1031 tpmPublic->publicArea.parameters.eccDetail.curveID = tpmCurveId; in get_ecc_tpm2b_public_from_evp()
1135 TPM2B_PUBLIC *tpmPublic) in ifapi_get_tpm2b_public_from_pem() argument
1139 return_if_null(tpmPublic, "public is NULL", TSS2_FAPI_RC_BAD_REFERENCE); in ifapi_get_tpm2b_public_from_pem()
1147 tpmPublic->publicArea.type = TPM2_ALG_RSA; in ifapi_get_tpm2b_public_from_pem()
1148 r = get_rsa_tpm2b_public_from_evp(publicKey, tpmPublic); in ifapi_get_tpm2b_public_from_pem()
1152 tpmPublic->publicArea.type = TPM2_ALG_ECC; in ifapi_get_tpm2b_public_from_pem()
1153 r = get_ecc_tpm2b_public_from_evp(publicKey, tpmPublic); in ifapi_get_tpm2b_public_from_pem()
1671 TPM2B_PUBLIC *tpmPublic) in ifapi_cert_to_pem() argument
1715 tpmPublic->publicArea.type = TPM2_ALG_RSA; in ifapi_cert_to_pem()
1716 r = get_rsa_tpm2b_public_from_evp(publicKey, tpmPublic); in ifapi_cert_to_pem()
1720 tpmPublic->publicArea.type = TPM2_ALG_ECC; in ifapi_cert_to_pem()
1721 r = get_ecc_tpm2b_public_from_evp(publicKey, tpmPublic); in ifapi_cert_to_pem()