Hello.
Could somebody explain if this is an error in the source code of glassfish?
public String[] getServerAliases(String keyType, Principal[] issuers) {
137 ArrayList serverAliases = new ArrayList();
138 for (int i = 0; i < mgrs.length; i++) {
139 String[] serAliases = mgrs[i].getClientAliases(keyType, issuers);
140 if (serAliases != null && serAliases.length > 0) {
141 for (int j = 0; j < serAliases.length; j++) {
142 serverAliases.add(serAliases[j]);
143 }
144 }
145 }
146
147 return (serverAliases.size() == 0) ? null :
148 (String[])serverAliases.toArray(new String[serverAliases.size()]);
149 }
This piece of code is from http://grepcode.com/file/repo1.maven.org/maven2/org.glassfish.security/s...
I have not found the source code of glassfish 4, but it looks like this possible error exists in glassfish 4. Here I see that getServerAliases uses getClientAliases.
I use a JSSE provider which implements X509KeyManager with getServerAliases and getClientAliases methods. These methods make different things.
I am trying to use the provider with glassfish 4. When starts up, Glassfish creates a manager with type of J2EEKeyManager and my key manager inside.
I think that it is the reason of my problem - glassfish uses getClientAliases instead of desirable getServerAliases.
Am i right?
Thanks.