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

Add support for data-ciphers and data-ciphers-fallback to OpenVPN #36

Merged
merged 1 commit into from Feb 29, 2024

Conversation

LaakkonenJussi
Copy link
Contributor

No description provided.

@LaakkonenJussi LaakkonenJussi changed the title [settings-vpn] Add support for data-ciphers to OpenVPN. JB#61635 WIP: [settings-vpn] Add support for data-ciphers to OpenVPN. JB#61635 Feb 27, 2024
@LaakkonenJussi
Copy link
Contributor Author

Need to check the provisioning file format for this and test it.

@LaakkonenJussi
Copy link
Contributor Author

The options are:

data-ciphers AES-128-CBC:AES-192-CBC:AES-192-CFB:AES-192-OFB:AES-256-CBC:AES-256-CFB:AES-256-OFB
data-ciphers-fallback AES-128-CBC

So maybe we should support the fallback cipher as well. And to ensure that the ciphers line gets parsed.

@LaakkonenJussi LaakkonenJussi changed the title WIP: [settings-vpn] Add support for data-ciphers to OpenVPN. JB#61635 [settings-vpn] Add support for data-ciphers to OpenVPN. JB#61635 Feb 28, 2024
@LaakkonenJussi
Copy link
Contributor Author

@mlehtima Since the whole data-ciphers arg is one big string we do not really need to parse it, just take it as a whole. We do not do much verification here either so no use starting to do it now. If we do, we make a new task to add verification for all.

@Thaodan
Copy link
Contributor

Thaodan commented Feb 29, 2024

@mlehtima Since the whole data-ciphers arg is one big string we do not really need to parse it, just take it as a whole. We do not do much verification here either so no use starting to do it now. If we do, we make a new task to add verification for all.

I wonder if makes sense to have all the options matched to each vpn type in a map which property is which option for connman.

We can use something like std::map<QString, QString> and then use std::map::find or std::map::contains (C++20).

Copy link
Contributor

@Thaodan Thaodan left a comment

Choose a reason for hiding this comment

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

Approved, see suggestion in comment.

@LaakkonenJussi
Copy link
Contributor Author

I wonder if makes sense to have all the options matched to each vpn type in a map which property is which option for connman.

We can use something like std::map<QString, QString> and then use std::map::find or std::map::contains (C++20).

This could for sure use some improvement. Updating this does indeed seem a bit of a mess but we'll create another task for that.

@LaakkonenJussi LaakkonenJussi changed the title [settings-vpn] Add support for data-ciphers to OpenVPN. JB#61635 Add support for data-ciphers and data-ciphers-fallback to OpenVPN Feb 29, 2024
…enVPN. JB#61635

This enables support for:
   - data-ciphers set in provision file that are mapped to
     OpenVPN.DataCiphers setting value resulting in use of
     --data-ciphers <string> for the openvpn binary.
   - data-ciphers-fallback set in provision file that are mapped to
     OpenVPN.DataCiphersFallback setting value resulting in use of
     --data-ciphers-fallback <string> for the openvpn binary
@LaakkonenJussi LaakkonenJussi merged commit 1dba2a3 into sailfishos:master Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants