@@ -74,6 +74,7 @@ def __init__(
7474 credentials : ydb .Credentials | dict | str | None = None ,
7575 ydb_session_pool : SessionPool | AsyncSessionPool | None = None ,
7676 root_certificates_path : str | None = None ,
77+ root_certificates : str | None = None ,
7778 ** kwargs : dict ,
7879 ) -> None :
7980 protocol = protocol if protocol else "grpc"
@@ -97,14 +98,17 @@ def __init__(
9798 self ._session_pool ._query_client_settings = settings
9899 self ._driver = self ._session_pool ._driver
99100 else :
101+ if root_certificates is None :
102+ root_certificates = ydb .load_ydb_root_certificate (
103+ root_certificates_path
104+ )
105+
100106 driver_config = ydb .DriverConfig (
101107 endpoint = self .endpoint ,
102108 database = self .database ,
103109 credentials = self .credentials ,
104110 query_client_settings = self ._get_client_settings (),
105- root_certificates = ydb .load_ydb_root_certificate (
106- root_certificates_path
107- ),
111+ root_certificates = root_certificates ,
108112 )
109113 self ._driver = self ._driver_cls (driver_config )
110114 self ._session_pool = self ._pool_cls (self ._driver , size = 5 )
@@ -181,6 +185,7 @@ def __init__(
181185 credentials : ydb .Credentials | None = None ,
182186 ydb_session_pool : SessionPool | AsyncSessionPool | None = None ,
183187 root_certificates_path : str | None = None ,
188+ root_certificates : str | None = None ,
184189 ** kwargs : dict ,
185190 ) -> None :
186191 super ().__init__ (
@@ -192,6 +197,7 @@ def __init__(
192197 credentials = credentials ,
193198 ydb_session_pool = ydb_session_pool ,
194199 root_certificates_path = root_certificates_path ,
200+ root_certificates = root_certificates ,
195201 ** kwargs ,
196202 )
197203 self ._current_cursor : Cursor | None = None
@@ -369,6 +375,7 @@ def __init__(
369375 credentials : ydb .Credentials | None = None ,
370376 ydb_session_pool : SessionPool | AsyncSessionPool | None = None ,
371377 root_certificates_path : str | None = None ,
378+ root_certificates : str | None = None ,
372379 ** kwargs : dict ,
373380 ) -> None :
374381 super ().__init__ (
@@ -380,6 +387,7 @@ def __init__(
380387 credentials = credentials ,
381388 ydb_session_pool = ydb_session_pool ,
382389 root_certificates_path = root_certificates_path ,
390+ root_certificates = root_certificates ,
383391 ** kwargs ,
384392 )
385393 self ._current_cursor : AsyncCursor | None = None
0 commit comments