Lines Matching refs:pkey
581 if (cert->pkey != NULL) { in test_ssl_endpoint_certificate_free()
583 if (mbedtls_pk_get_type(cert->pkey) == MBEDTLS_PK_OPAQUE) { in test_ssl_endpoint_certificate_free()
584 psa_destroy_key(cert->pkey->priv_id); in test_ssl_endpoint_certificate_free()
587 mbedtls_pk_free(cert->pkey); in test_ssl_endpoint_certificate_free()
588 mbedtls_free(cert->pkey); in test_ssl_endpoint_certificate_free()
589 cert->pkey = NULL; in test_ssl_endpoint_certificate_free()
613 TEST_CALLOC(cert->pkey, 1); in mbedtls_test_ssl_endpoint_certificate_init()
617 mbedtls_pk_init(cert->pkey); in mbedtls_test_ssl_endpoint_certificate_init()
640 cert->pkey, in mbedtls_test_ssl_endpoint_certificate_init()
653 cert->pkey, in mbedtls_test_ssl_endpoint_certificate_init()
668 cert->pkey, in mbedtls_test_ssl_endpoint_certificate_init()
681 cert->pkey, in mbedtls_test_ssl_endpoint_certificate_init()
693 TEST_EQUAL(mbedtls_pk_get_psa_attributes(cert->pkey, PSA_KEY_USAGE_SIGN_HASH, in mbedtls_test_ssl_endpoint_certificate_init()
701 TEST_EQUAL(mbedtls_pk_import_into_psa(cert->pkey, &key_attr, &key_slot), 0); in mbedtls_test_ssl_endpoint_certificate_init()
702 mbedtls_pk_free(cert->pkey); in mbedtls_test_ssl_endpoint_certificate_init()
703 mbedtls_pk_init(cert->pkey); in mbedtls_test_ssl_endpoint_certificate_init()
704 TEST_EQUAL(mbedtls_pk_setup_opaque(cert->pkey, key_slot), 0); in mbedtls_test_ssl_endpoint_certificate_init()
715 cert->pkey); in mbedtls_test_ssl_endpoint_certificate_init()
724 cert->pkey); in mbedtls_test_ssl_endpoint_certificate_init()