Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask_android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Roro Mad
bitmask_android
Commits
cb7894ef
Commit
cb7894ef
authored
4 years ago
by
cyberta
Browse files
Options
Downloads
Patches
Plain Diff
add missing data-cipher flags to VpnProfile and ConfigParser, fixes cipher negotiation issues
parent
50cf8dc8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/main/java/de/blinkt/openvpn/VpnProfile.java
+7
-0
7 additions, 0 deletions
app/src/main/java/de/blinkt/openvpn/VpnProfile.java
app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+23
-0
23 additions, 0 deletions
app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
with
30 additions
and
0 deletions
app/src/main/java/de/blinkt/openvpn/VpnProfile.java
+
7
−
0
View file @
cb7894ef
...
@@ -145,6 +145,7 @@ public class VpnProfile implements Serializable, Cloneable {
...
@@ -145,6 +145,7 @@ public class VpnProfile implements Serializable, Cloneable {
public
String
mCustomConfigOptions
=
""
;
public
String
mCustomConfigOptions
=
""
;
public
String
mVerb
=
"1"
;
//ignored
public
String
mVerb
=
"1"
;
//ignored
public
String
mCipher
=
""
;
public
String
mCipher
=
""
;
public
String
mDataCiphers
=
""
;
public
boolean
mNobind
=
true
;
public
boolean
mNobind
=
true
;
public
boolean
mUseDefaultRoutev6
=
true
;
public
boolean
mUseDefaultRoutev6
=
true
;
public
String
mCustomRoutesv6
=
""
;
public
String
mCustomRoutesv6
=
""
;
...
@@ -630,6 +631,12 @@ public class VpnProfile implements Serializable, Cloneable {
...
@@ -630,6 +631,12 @@ public class VpnProfile implements Serializable, Cloneable {
cfg
.
append
(
"remote-cert-tls server\n"
);
cfg
.
append
(
"remote-cert-tls server\n"
);
}
}
if
(!
TextUtils
.
isEmpty
(
mDataCiphers
))
{
cfg
.
append
(
"data-ciphers "
).
append
(
mDataCiphers
).
append
(
"\n"
);
}
if
(!
TextUtils
.
isEmpty
(
mCipher
))
{
if
(!
TextUtils
.
isEmpty
(
mCipher
))
{
cfg
.
append
(
"cipher "
).
append
(
mCipher
).
append
(
"\n"
);
cfg
.
append
(
"cipher "
).
append
(
mCipher
).
append
(
"\n"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+
23
−
0
View file @
cb7894ef
...
@@ -537,10 +537,33 @@ public class ConfigParser {
...
@@ -537,10 +537,33 @@ public class ConfigParser {
np
.
mUseLzo
=
Boolean
.
valueOf
(
useLzo
.
get
(
1
));
np
.
mUseLzo
=
Boolean
.
valueOf
(
useLzo
.
get
(
1
));
}
}
Vector
<
String
>
ncp_ciphers
=
getOption
(
"ncp-ciphers"
,
1
,
1
);
Vector
<
String
>
data_ciphers
=
getOption
(
"data-ciphers"
,
1
,
1
);
Vector
<
String
>
cipher
=
getOption
(
"cipher"
,
1
,
1
);
Vector
<
String
>
cipher
=
getOption
(
"cipher"
,
1
,
1
);
if
(
cipher
!=
null
)
if
(
cipher
!=
null
)
np
.
mCipher
=
cipher
.
get
(
1
);
np
.
mCipher
=
cipher
.
get
(
1
);
if
(
data_ciphers
==
null
)
{
data_ciphers
=
ncp_ciphers
;
}
/* The world is not yet ready to only use data-ciphers, add --cipher to data-ciphers
* for now on import */
if
(
data_ciphers
!=
null
)
{
np
.
mDataCiphers
=
data_ciphers
.
get
(
1
);
if
(!
TextUtils
.
isEmpty
(
np
.
mCipher
)
&&
!
np
.
mDataCiphers
.
contains
(
np
.
mCipher
))
{
np
.
mDataCiphers
+=
":"
+
np
.
mCipher
;
}
}
else
if
(!
TextUtils
.
isEmpty
(
np
.
mCipher
)
&&
!
np
.
mCipher
.
equals
(
"AES-128-GCM"
)
&&
!
np
.
mCipher
.
equals
(
"AES-256"
))
{
np
.
mDataCiphers
+=
"AES-256-GCM:AES-128-GCM:"
+
np
.
mCipher
;
}
Vector
<
String
>
auth
=
getOption
(
"auth"
,
1
,
1
);
Vector
<
String
>
auth
=
getOption
(
"auth"
,
1
,
1
);
if
(
auth
!=
null
)
if
(
auth
!=
null
)
np
.
mAuth
=
auth
.
get
(
1
);
np
.
mAuth
=
auth
.
get
(
1
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment