Skip to content

Commit

Permalink
Merged in PAYARA-331-fix-github-issue-371-creating (pull request paya…
Browse files Browse the repository at this point in the history
…ra#7)

PAYARA-331 fixes payara#371 create-protocol correclt creates ssl subtag if security enabled
  • Loading branch information
smillidge committed Aug 19, 2015
2 parents 74cd1e6 + 1844010 commit c8a6499
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* only if the new code is made subject to such option by the copyright
* holder.
*/

// Portions Copyright [2015] [C2B2 Consulting Limited]
package org.glassfish.web.admin.cli;

import com.sun.enterprise.config.serverbeans.Config;
Expand Down Expand Up @@ -71,6 +71,7 @@

import java.text.MessageFormat;
import java.util.ResourceBundle;
import org.glassfish.grizzly.config.dom.Ssl;

/**
* Command to create protocol element within network-config
Expand Down Expand Up @@ -170,6 +171,13 @@ public Object run(Protocols param) throws TransactionFailure {
newProtocol.setName(name);
newProtocol.setSecurityEnabled(securityEnabled == null ? null : securityEnabled.toString());
param.getProtocol().add(newProtocol);
if (securityEnabled) {
Ssl ssl = newProtocol.createChild(Ssl.class);
ssl.setCertNickname("s1as");
ssl.setSsl2Enabled("false");
ssl.setSsl3Enabled("false");
newProtocol.setSsl(ssl);
}
return newProtocol;
}
}, protocols);
Expand Down

0 comments on commit c8a6499

Please sign in to comment.