示例#1
0
            public void WithTrustStrategyShouldModifyTheSingleValue()
            {
                var config = Config.Builder.WithTrustStrategy(TrustStrategy.TrustSystemCaSignedCertificates()).ToConfig();

                config.EncryptionLevel.Should().Be(EncryptionLevel.EncryptedNonLocal);
                config.TrustStrategy.ServerTrustStrategy().Should().Be(TrustStrategy.Strategy.TrustSystemCaSignedCertificates);
                config.TrustStrategy.FileName().Should().BeNull();
                config.Logger.Should().BeOfType <DebugLogger>();
                config.MaxIdleSessionPoolSize.Should().Be(10);
            }
示例#2
0
        public void TlsSigned()
        {
            //tag::tls-signed[]
            var driver = GraphDatabase.Driver("bolt://localhost", AuthTokens.Basic("neo4j", "neo4j"),
                                              Config.Builder.WithEncryptionLevel(EncryptionLevel.Encrypted).WithTrustStrategy(TrustStrategy.TrustSystemCaSignedCertificates()).ToConfig());

            //end::tls-signed[]
            driver.Dispose();
        }