11package io .objectbox .sync ;
22
3+ import javax .annotation .Nullable ;
4+
35import io .objectbox .BoxStore ;
46import io .objectbox .annotation .apihint .Experimental ;
57import io .objectbox .sync .internal .Platform ;
68
7- import javax .annotation .Nullable ;
8-
99/**
1010 * A builder to create a {@link SyncClient}; the builder itself should be created via
1111 * {@link Sync#client(BoxStore, String, SyncCredentials)}.
@@ -19,12 +19,11 @@ public class SyncBuilder {
1919 final String url ;
2020 final SyncCredentials credentials ;
2121
22- @ Nullable
23- String certificatePath ;
24-
2522 SyncClientListener listener ;
2623 SyncChangesListener changesListener ;
2724
25+ @ Nullable
26+ String [] trustedCertPaths ;
2827 boolean uncommittedAcks ;
2928 boolean manualStart ;
3029
@@ -72,9 +71,15 @@ public SyncBuilder(BoxStore boxStore, String url, SyncCredentials credentials) {
7271 this .credentials = credentials ;
7372 }
7473
75- // TODO Check if this should remain exposed in the final API
76- public SyncBuilder certificatePath (String certificatePath ) {
77- this .certificatePath = certificatePath ;
74+ /**
75+ * Configures a custom set of directory or file paths to search for trusted certificates in.
76+ * The first path that exists will be used.
77+ * <p>
78+ * Using this option is not recommended in most cases, as by default the sync client uses
79+ * the certificate authorities trusted by the host platform.
80+ */
81+ public SyncBuilder trustedCertificates (String [] paths ) {
82+ this .trustedCertPaths = paths ;
7883 return this ;
7984 }
8085
0 commit comments