<?xml version="1.0" encoding="gb2312" ?>
<xs:schema targetNamespace="http://www.h3c.com/netconf/config:1.0"
                  elementFormDefault="qualified"
                  xmlns="http://www.h3c.com/netconf/config:1.0"
                  xmlns:base="http://www.h3c.com/netconf/base:1.0"
                  xmlns:netconf ="urn:ietf:params:xml:ns:netconf:base:1.0"
                  xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://www.h3c.com/netconf/base:1.0" schemaLocation="basetype.xsd"></xs:import>
  <xs:import schemaLocation="netconf.xsd" namespace="urn:ietf:params:xml:ns:netconf:base:1.0"></xs:import>

  <xs:annotation>
    <xs:documentation >
      SSL config definition
    </xs:documentation>
  </xs:annotation>
  
  <!--SSL module-->
  <xs:element name="SSL">
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <!--SSL Table-->
        
        <!--ClientPolicies Table-->
        <xs:element name="ClientPolicies" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Operate SSL client policies</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Policy" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Name" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          The name of the SSL client policy, 1 to 31 characters, case insensitive
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:String">
                            <xs:minLength value="1"></xs:minLength>
                            <xs:maxLength value="31"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="SSLVersion" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          The protocol version of ssl client 
                          Enumeration:
                          1-TSL 1.0
                          2-SSL 3.0
                          Default value is TSL 1.0
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                            <xs:enumeration value="1"></xs:enumeration>
                            <xs:enumeration value="2"></xs:enumeration>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="PKIDomain" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          Specify a PKI domain for the SSL client policy, 1 to 31 characters, case insensitive
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:String">
                            <xs:minLength value="1"></xs:minLength>
                            <xs:maxLength value="31"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="PerferCipherList" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Perferential cipher list, Data structure, members include: CipherSuiteItem</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="CipherItem" minOccurs="0" maxOccurs="1" nillable="true">
                            <xs:annotation>
                              <xs:documentation>
                               The cipher suite number for SSL client, The cipher suite number is defined by SSLCapabilities table
                              </xs:documentation>
                            </xs:annotation>
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:restriction base="base:UnsignedInteger32">
                                  <xs:minInclusive value="1"></xs:minInclusive>
                                  <xs:maxInclusive value="11"></xs:maxInclusive>
                                </xs:restriction>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="ServerVerify" type="base:Boolean" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          If verify SSL server
                          Boolean:
                          true-Verify SSL server
                          false-Don't verify SSL server
                          Default value is true
                        </xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:all>
                  <xs:attributeGroup ref="base:RowAttributeGroup"></xs:attributeGroup>
                </xs:complexType>
              </xs:element>
            </xs:choice>
            <xs:attributeGroup ref="base:TableAttributeGroup"></xs:attributeGroup>
          </xs:complexType>
        </xs:element>

        <!--ServerPolicies Table-->
        <xs:element name="ServerPolicies" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Operate SSL server policies</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Policy" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Name" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          The name of the SSL server policy, 1 to 31 characters, case insensitive
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:String">
                            <xs:minLength value="1"></xs:minLength>
                            <xs:maxLength value="31"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="SessionCacheSize" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          The maximum number of cached session, unsigned integer, 100 to 20480, default value is 500
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                            <xs:minInclusive value="100"></xs:minInclusive>
                            <xs:maxInclusive value="20480"></xs:maxInclusive>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="SessionTimeout" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          The session timeout value, unsigned integer, 0 to 86400, default value is 3600
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                            <xs:minInclusive value="1"></xs:minInclusive>
                            <xs:maxInclusive value="4294967295"></xs:maxInclusive>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="PKIDomain" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          Specify an PKI domain for the SSL server policy, 1 to 31 characters, case insensitive
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:String">
                            <xs:minLength value="1"></xs:minLength>
                            <xs:maxLength value="31"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="CipherSuiteList" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>The list of cipher suite, data structure, members include: CipherSuiteItem</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="CipherItem" minOccurs="0" maxOccurs="11" nillable="true">
                            <xs:annotation>
                              <xs:documentation>
                               The cipher suite number for SSL server
                              </xs:documentation>
                            </xs:annotation>
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:restriction base="base:UnsignedInteger32">
                                  <xs:minInclusive value="1"></xs:minInclusive>
                                  <xs:maxInclusive value="11"></xs:maxInclusive>
                                </xs:restriction>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="ClientVerify" type="base:Boolean" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          If verify SSL client
                          Boolean:
                          true: Verify SSL client
                          false: Don¡¯t verify SSL client
                          Default value is false
                        </xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    
                    <xs:element name="ClientVerifyMode" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          Authenticate client mode
                           Enumeration:
                          0-Don't verify SSL client 
                          1-Verify SSL client
                          2-Verify SSL client is optional
                          Default value is 0
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                            <xs:enumeration value="0"></xs:enumeration>
                            <xs:enumeration value="1"></xs:enumeration>
                            <xs:enumeration value="2"></xs:enumeration>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    
                  </xs:all>
                  <xs:attributeGroup ref="base:RowAttributeGroup"></xs:attributeGroup>
                </xs:complexType>
              </xs:element>
            </xs:choice>
            <xs:attributeGroup ref="base:TableAttributeGroup"></xs:attributeGroup>
          </xs:complexType>
        </xs:element>

        <!--SSLGlobalConfig Table-->
            <xs:element name="SSLGlobalConfig" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Operate SSL global config</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:all>                                     

                  <xs:element name="SSL3Enabled" minOccurs="0" type="base:Boolean" nillable="true">                    
                    <xs:annotation>
                      <xs:documentation>
                        Enable SSL3.0
                        Boolean:
                        true-Enable(default)
                        false-Disable
                      </xs:documentation>                        
                    </xs:annotation>                                      
                  </xs:element>           

                </xs:all>   
                 <xs:attributeGroup ref="base:TableAttributeGroup"></xs:attributeGroup>     
               </xs:complexType>        
            </xs:element>

      </xs:choice>
      <xs:attributeGroup ref="base:NodeAttributeGroup"></xs:attributeGroup>
    </xs:complexType>
  </xs:element>
</xs:schema>