Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 554 Bytes

7-Https-CN.md

File metadata and controls

25 lines (21 loc) · 554 Bytes

HTTPS配置

  1. 忽略证书
from aliyunsdkcore.client import AcsClient

client = AcsClient(
    '<access_key_id>', # AccessKey ID
    '<access_secret>', # Access Key Secret
    '<region_id>', # 地域ID
    verify=False  # 忽略对 SSL 证书的验证
)
  1. 指定CA证书文件
from aliyunsdkcore.client import AcsClient

client = AcsClient(
    '<access_key_id>', # AccessKey ID
    '<access_secret>', # Access Key Secret
    '<region_id>', # 地域ID
    verify='./cacert.pem'  # 证书路径
)