Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to configure ssl in vanilla connection string #1672

Merged
merged 10 commits into from
May 14, 2023
Merged

Conversation

Pliner
Copy link
Member

@Pliner Pliner commented May 12, 2023

Alternative to #1671, supports only ssl=true parameter.

There is no need to patch hosts because of that:

image

[Fact]
public void Should_parse_global_timeout()
{
const string connectionStringWithTimeout = "host=localhost;timeout=13";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timeout is covered by the previous test

@Pliner Pliner changed the title Allow to enable ssl in vanilla connection string Allow to configure ssl in vanilla connection string May 13, 2023
if (!propertyInfo.CanWrite)
throw new ArgumentOutOfRangeException(nameof(getter), "Member is not a writeable property");

var valueParameterExpr = Expression.Parameter(typeof(TProperty), "value");
Copy link
Member Author

@Pliner Pliner May 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support expressions with a single member access(c => c.Name) as well as with multiple ones(c => c.Ssl.Enabled).

@Pliner Pliner merged commit d69b642 into master May 14, 2023
3 checks passed
@Pliner Pliner deleted the basic-ssl-support branch May 14, 2023 18:40
Pliner added a commit that referenced this pull request May 14, 2023
* Allow to enable ssl in vanilla connection string

* Remove irrelevant comments

* Support other ssl options

* Ssl server name should be taken from the hostname

* Stop setting a default version

* Defensively copy Ssl, set hostname to servername

* Remain only ssl flag

* Remove useless comments

* Do not copy endpoint ssl

* Simplify code
@Pliner
Copy link
Member Author

Pliner commented May 14, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant