zoukankan      html  css  js  c++  java
  • 安装Portal for ArcGIS时如何正确配置HTTPS证书

    SSL协议位于TCP/IP协议与各种应用层协议之间,为数据通讯提供安全支持。SSL协议可分为两层: SSL记录协议(SSL Record Protocol):它建立在可靠的传输协议(如TCP)之上,为高层协议提供数据封装、压缩、加密等基本功能的支持。 SSL握手协议(SSL Handshake Protocol):它建立在SSL记录协议之上,用于在实际的数据传输开始前,通讯双方进行身份认证、协商加密算法、交换加密密钥等。

    它提供了以下服务:

    1)认证用户和服务器,确保数据发送到正确的客户机和服务器;

    2)加密数据以防止数据中途被窃取;

    3)维护数据的完整性,确保数据在传输过程中不被改变。

    在配置Portal for ArcGIS时候,由于需要用到HTTPS进行访问以及和ArcGIS Server进行通讯,所以需要用到SSL。

    OpenSSL 是一个强大的安全套接字层密码库,囊括主要的密码算法、常用的密钥和证书封装管理功能及SSL协议,并提供丰富的应用程序

    供测试或其它目的使用。OpenSSL整个软件包大概可以分成三个主要的功能部分:密码算法库、SSL协议库以及应用程序。

    以下为使用OpenSSL对SSL的常规配置流程。

    1.生成密钥对

    openssl genrsa -des3 -out myServer.key 2048

    2.生成证书签名请求。

    openssl req -new -key myServer.key -out myServer.csr  -subj

    "/C=CN/ST=Guangdong/L=Guangzhou/O=Esri/OU=IT/CN=www.seanpc.com"

    注意:CN为服务器域名名称。

    3.签名证书

    openssl req -x509 -sha256 -days 3650 -key myServer.key -in myServer.csr -out myServer.crt

    4.测试证书。

    openssl x509 -noout -text -in myServer.crt

    6.导出PKCS标准的证书。该格式证书可以被导入到IIS中。

    openssl pkcs12 -export -inkey myServer.key -in myServer.crt -name www.seanpc.com -out myServer.pfx

    7.导入到tomcat或IIS服务器中以启动Https。

    #对于IIS服务器,双击myServer.pfx启动导入向导。

    #对于tomcat服务器,修改server.xml配置文件如下。

    ##使用JSSE实现:

     1 <!-- Define a HTTP/1.1 Connector on port 8443, JSSE NIO implementation -->
     2 
     3 <Connector protocol="org.apache.coyote.http11.Http11NioProtocol"
     4 
     5            port="8443" .../>
     6 
     7  
     8 
     9 <!-- Define a HTTP/1.1 Connector on port 8443, JSSE BIO implementation -->
    10 
    11 <Connector protocol="org.apache.coyote.http11.Http11Protocol"
    12 
    13            port="8443" .../>
    1 <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
    2 <Connector
    3            protocol="org.apache.coyote.http11.Http11NioProtocol"
    4            port="8443" maxThreads="200"
    5            scheme="https" secure="true" SSLEnabled="true"
    6            keystoreFile="${user.home}/.keystore" keystorePass="changeit"
    7            clientAuth="false" sslProtocol="TLS"/>

    ##使用APR OpenSSL引擎实现:

    1 <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
    2  
    3 
    4 <!-- Define a HTTP/1.1 Connector on port 8443, APR implementation -->
    5 <Connector protocol="org.apache.coyote.http11.Http11AprProtocol"
    6            port="8443" .../>
    1 <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
    2 <Connector
    3            protocol="org.apache.coyote.http11.Http11Protocol"
    4            port="8443" maxThreads="200"
    5            scheme="https" secure="true" SSLEnabled="true" ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA"  clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1,TLSv1"
    6  keystoreType="PKCS12" keystoreFile="C:apache-tomcat-7.0.47myServer.pfx" keystorePass="esrichina"/>
  • 相关阅读:
    51nod 1138 【数学-等差数列】
    hdoj3665【简单DFS】
    hdoj3664【DP】
    51nod1270 【dp】
    51nod 1069【思维】
    关于一些数学符号和概率的阐述;
    51nod 1428【贪心】
    51nod 1133【贪心】
    51nod1127【尺取】
    51nod1126【矩阵快速幂】
  • 原文地址:https://www.cnblogs.com/luwl/p/5872465.html
Copyright © 2011-2022 走看看