Skip to content

Commit

Permalink
Fix verify-x509-name parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
schwabe committed Apr 29, 2016
1 parent 29a654d commit ad494bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,12 @@ public VpnProfile convertProfile() throws ConfigParseError, IOException {
if (verifyx509name.size() > 2) {
if (verifyx509name.get(2).equals("name"))
np.mX509AuthType = VpnProfile.X509_VERIFY_TLSREMOTE_RDN;
else if (verifyx509name.get(2).equals("subject"))
np.mX509AuthType = VpnProfile.X509_VERIFY_TLSREMOTE_DN;
else if (verifyx509name.get(2).equals("name-prefix"))
np.mX509AuthType = VpnProfile.X509_VERIFY_TLSREMOTE_RDN_PREFIX;
else
throw new ConfigParseError("Unknown parameter to x509-verify-name: " + verifyx509name.get(2));
throw new ConfigParseError("Unknown parameter to verify-x509-name: " + verifyx509name.get(2));
} else {
np.mX509AuthType = VpnProfile.X509_VERIFY_TLSREMOTE_DN;
}
Expand Down

0 comments on commit ad494bd

Please sign in to comment.