當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


Python ArcGIS SSLCertificates.get用法及代碼示例


本文簡要介紹 python 語言中 arcgis.gis.admin.SSLCertificates.get 的用法。

用法:

get(alias_name)

返回:

~arcgis.gis.admin.SSLCertificate 對象

通過別名獲取單個 SSLCertificate 對象

Parameter

Description

alias_name

必需的字符串。證書的通用名稱。

USAGE: Print out information about a specific SSL Certificate by alias name

from arcgis.gis import GIS
gis = GIS("https://yourportal.com/portal", "portaladmin", "password")
# Get the SSL Certificate class
sslmgr = gis.admin.security.ssl
# Get a specific certificate alias and print information
ssl = sslmgr.get('portal')
for prop in ssl.properties:
    print(prop, ssl.properties[prop])]))

# Output
aliasName portal
issuer CN=YOURPORTAL.COM, OU=Self Signed Certificate
subject CN=YOURPORTAL.COM, OU=Self Signed Certificate
subjectAlternativeNames []
validFrom Fri Sep 15 07:46:45 EDT 2017
validUntil Sun Jul 24 07:46:45 EDT 2050
keyAlgorithm RSA
keySize 2048
serialNumber 503b23c6
version 3
signatureAlgorithm SHA256withRSA
keyUsage []
md5Fingerprint 76d695d72e46b30ea90013676d559faa
sha1Fingerprint 6f36513757c28ad43c2df5e4c7cee581ad18dd1e
sha256Fingerprint a051aab19d1ed8ceee7322572b3b1b2abd1ed680d0a1d81d0da84cf0e1a1b6cb

相關用法


注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.gis.admin.SSLCertificates.get。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。