Skip to content

Commit adc5405

Browse files
committed
Compilation OK
1 parent 75283cf commit adc5405

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/logging.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717

1818
use bitflags::bitflags;
1919
use crate::c_api::{
20-
kCBLLogDomainMaskAll, kCBLLogDomainMaskDatabase, kCBLLogDomainMaskNetwork,
21-
kCBLLogDomainMaskQuery, kCBLLogDomainMaskReplicator, CBLConsoleLogSink, CBLCustomLogSink,
22-
CBLLogDomain, CBLLogLevel, CBLLogSinks_SetConsole, CBLLogSinks_SetCustom, FLString,
20+
kCBLLogDomainMaskAll, kCBLLogDomainMaskDatabase, kCBLLogDomainMaskListener,
21+
kCBLLogDomainMaskNetwork, kCBLLogDomainMaskQuery, kCBLLogDomainMaskReplicator,
22+
CBLConsoleLogSink, CBLCustomLogSink, CBLLogDomain, CBLLogLevel, CBLLogSinks_SetConsole,
23+
CBLLogSinks_SetCustom, FLString,
2324
};
2425

2526
use enum_primitive::FromPrimitive;
@@ -32,6 +33,7 @@ enum_from_primitive! {
3233
Query,
3334
Replicator,
3435
Network,
36+
Listener,
3537
None
3638
}
3739
}
@@ -62,6 +64,7 @@ bitflags! {
6264
const QUERY = kCBLLogDomainMaskQuery;
6365
const REPLICATOR = kCBLLogDomainMaskReplicator;
6466
const NETWORK = kCBLLogDomainMaskNetwork;
67+
const LISTENER = kCBLLogDomainMaskListener;
6568
const ALL = kCBLLogDomainMaskAll;
6669
}
6770
}

src/replicator.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,10 @@ pub struct ReplicatorConfiguration {
745745
This option is disabled by default (see \ref kCBLDefaultReplicatorAcceptParentCookies) which means
746746
that the parent-domain cookies are not permitted to save by default. */
747747
pub accept_parent_domain_cookies: bool,
748+
/** Specify the replicator to accept only self-signed certs. Any non-self-signed certs will be rejected
749+
to avoid accidentally using this mode with the non-self-signed certs in production. */
750+
#[cfg(feature = "enterprise")]
751+
accept_only_self_signed_server_certificate: bool,
748752
}
749753

750754
//======== LIFECYCLE
@@ -855,6 +859,9 @@ impl Replicator {
855859
},
856860
collectionCount: collections.as_ref().map(|c| c.len()).unwrap_or_default(),
857861
acceptParentDomainCookies: config.accept_parent_domain_cookies,
862+
#[cfg(feature = "enterprise")]
863+
acceptOnlySelfSignedServerCertificate: config
864+
.accept_only_self_signed_server_certificate,
858865
context: std::ptr::addr_of!(*context) as *mut _,
859866
};
860867

0 commit comments

Comments
 (0)