|
| 1 | +<!-- |
| 2 | + |
| 3 | + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
| 4 | + |
| 5 | + Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved. |
| 6 | + |
| 7 | + The contents of this file are subject to the terms of either the GNU |
| 8 | + General Public License Version 2 only ("GPL") or the Common Development |
| 9 | + and Distribution License("CDDL") (collectively, the "License"). You |
| 10 | + may not use this file except in compliance with the License. You can |
| 11 | + obtain a copy of the License at |
| 12 | + https://oss.oracle.com/licenses/CDDL+GPL-1.1 |
| 13 | + or LICENSE.txt. See the License for the specific |
| 14 | + language governing permissions and limitations under the License. |
| 15 | + |
| 16 | + When distributing the software, include this License Header Notice in each |
| 17 | + file and include the License file at LICENSE.txt. |
| 18 | + |
| 19 | + GPL Classpath Exception: |
| 20 | + Oracle designates this particular file as subject to the "Classpath" |
| 21 | + exception as provided by Oracle in the GPL Version 2 section of the License |
| 22 | + file that accompanied this code. |
| 23 | + |
| 24 | + Modifications: |
| 25 | + If applicable, add the following below the License Header, with the fields |
| 26 | + enclosed by brackets [] replaced by your own identifying information: |
| 27 | + "Portions Copyright [year] [name of copyright owner]" |
| 28 | + |
| 29 | + Contributor(s): |
| 30 | + If you wish your version of this file to be governed by only the CDDL or |
| 31 | + only the GPL Version 2, indicate your decision by adding "[Contributor] |
| 32 | + elects to include this software in this distribution under the [CDDL or GPL |
| 33 | + Version 2] license." If you don't indicate a single choice of license, a |
| 34 | + recipient has the option to distribute your version of this file under |
| 35 | + either the CDDL, the GPL Version 2 or to extend the choice of license to |
| 36 | + its licensees as provided above. However, if you add GPL Version 2 code |
| 37 | + and therefore, elected the GPL Version 2 license, then the option applies |
| 38 | + only if the new code is made subject to such option by the copyright |
| 39 | + holder. |
| 40 | + |
| 41 | +--> |
| 42 | + |
| 43 | +<!-- sslPrepare-copy.inc --> |
| 44 | + |
| 45 | +setPageSessionAttribute(key="edit" value="#{true}" ) |
| 46 | +gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}.json" valueMap="#{pageSession.valueMap}"); |
| 47 | +gf.createEntityResponseOutput(endpoint="#{pageSession.selfUrl}" attrs="#{pageSession.valueMap}" throwException="false" result="#{pageSession.resultMap}"); |
| 48 | +if ("#{pageSession.resultMap.data.exit_code}=FAILURE") { |
| 49 | + setPageSessionAttribute(key="edit" value="#{false}" ) |
| 50 | +} |
| 51 | +if (#{pageSession.edit}){ |
| 52 | + gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}.json" valueMap="#{pageSession.valueMap}"); |
| 53 | + convertToDifferentCiphersGroup(ciphers="#{pageSession.valueMap['ssl3TlsCiphers']}" |
| 54 | + CommonCiphersList="#{pageSession.selectedCommon}" |
| 55 | + EphemeralCiphersList="#{pageSession.selectedEphemeral}" |
| 56 | + OtherCiphersList="#{pageSession.selectedOther}" |
| 57 | + EccCiphersList="#{pageSession.selectedEcc}") |
| 58 | + |
| 59 | +} |
| 60 | +if (! #{pageSession.edit}){ |
| 61 | + <!-- this <ssl> does not exists, we cannot find a way to get the default value, so hard coded here for now. |
| 62 | + TODO: REST need to provide an endpoint to get the default value. |
| 63 | + --> |
| 64 | + createMap(result="#{pageSession.valueMap}"); |
| 65 | + mapPut(map="#{pageSession.valueMap}" key="ssl3Enabled" value="true"); |
| 66 | + mapPut(map="#{pageSession.valueMap}" key="tlsEnabled" value="true"); |
| 67 | + mapPut(map="#{pageSession.valueMap}" key="trustMaxCertLength" value="5"); |
| 68 | + |
| 69 | + convertToDifferentCiphersGroup(ciphers="#{pageSession.valueMap['ssl3TlsCiphers']}" |
| 70 | + CommonCiphersList="#{pageSession.selectedCommon}" |
| 71 | + EphemeralCiphersList="#{pageSession.selectedEphemeral}" |
| 72 | + OtherCiphersList="#{pageSession.selectedOther}" |
| 73 | + EccCiphersList="#{pageSession.selectedEcc}") |
| 74 | +} |
| 75 | + |
| 76 | +//set the following for including buttons.inc |
| 77 | +setPageSessionAttribute(key="convertToFalseList" value={"ssl3Enabled" "tlsEnabled" "clientAuthEnabled" }) |
| 78 | +setPageSessionAttribute(key="skipAttrsList", value={"sslInactivityTimeout"}); |
| 79 | +setPageSessionAttribute(key="showDefaultButton" value="#{false}" ) |
| 80 | +setPageSessionAttribute(key="hasPropertySheet" value="#{true}" ) |
| 81 | +setPageSessionAttribute(key="hasPropertyTable" value="#{false}" ) |
0 commit comments