Skip to content

Commit

Permalink
Fix for TLS issue
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethAyres committed Jan 17, 2019
1 parent 13961e2 commit 27697c0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/uk/ac/swansea/eduroamcat/WifiConfigAPI18.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,20 +237,20 @@ else if (aAuth.getInnerNonEAPType()==0) {

//just identity for TLS
if (aAuth.getOuterEAPType()==13) {
if (userName!=null)
if (userName.length()==0) if ( aAuth.getClientPrivateKeySubjectCN() != null && aAuth.getClientPrivateKeySubjectCN().length()>0) {
userName = aAuth.getClientPrivateKeySubjectCN();
enterpriseConfig.setIdentity(userName);
debug("Using Username:" + userName);
}
if (userName!=null) {
if (userName.length() == 0)
if (aAuth.getClientPrivateKeySubjectCN() != null && aAuth.getClientPrivateKeySubjectCN().length() > 0) {
userName = aAuth.getClientPrivateKeySubjectCN();
}
}
else
{
if ( aAuth.getClientPrivateKeySubjectCN() != null && aAuth.getClientPrivateKeySubjectCN().length()>0) {
userName = aAuth.getClientPrivateKeySubjectCN();
enterpriseConfig.setIdentity(userName);
debug("Using Username:" + userName);
}
}
enterpriseConfig.setIdentity(userName);
debug("Using Username:" + userName);
}

selectedConfig.enterpriseConfig=enterpriseConfig;
Expand Down

0 comments on commit 27697c0

Please sign in to comment.