Skip to content

Commit 88ece70

Browse files
committed
fix for issue GEANT#30
For eap-config profiles without the full TLS config/private key
1 parent ca6279e commit 88ece70

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/uk/ac/swansea/eduroamcat/WifiConfigAPI18.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,12 @@ else if (aAuth.getInnerNonEAPType()==0) {
237237

238238
//just identity for TLS
239239
if (aAuth.getOuterEAPType()==13) {
240-
if (userName.length()==0) userName=aAuth.getClientPrivateKeySubjectCN();
241-
enterpriseConfig.setIdentity(userName);
242-
debug("Using Username:"+userName);
240+
if (userName!=null)
241+
if (userName.length()==0) if ( aAuth.getClientPrivateKeySubjectCN() != null && aAuth.getClientPrivateKeySubjectCN().length()>0) {
242+
userName = aAuth.getClientPrivateKeySubjectCN();
243+
enterpriseConfig.setIdentity(userName);
244+
debug("Using Username:" + userName);
245+
}
243246
}
244247

245248
selectedConfig.enterpriseConfig=enterpriseConfig;

0 commit comments

Comments
 (0)