全部產品
Search
文件中心

Alibaba Cloud SDK:SSL 驗證

更新時間:Oct 30, 2025

摘要

請求時驗證SSL認證行為。

  • 設定成

    true

    禁用認證驗證(這是不安全的,請設定認證!)。

  • 設定成

    false

    啟用SSL認證驗證,預設使用作業系統提供的CA認證。

預設值

  • false

設定

// 佈建要求 HTTPSInsecure(隻影響當前)
request.SetHTTPSInsecure(true)                           // 佈建要求 HTTPSInsecure 為 true
isInsecure := request.GetHTTPSInsecure()                 // 擷取請求 HTTPSInsecure

當請求未設定時,用戶端設定才會生效.

// 設定用戶端 HTTPSInsecure(用於用戶端發送的所有請求)。
client.SetHTTPSInsecure(true)                         // 設定用戶端 HTTPSInsecure 為 true
isInsecure := client.GetHTTPSInsecure()               // 擷取用戶端 HTTPSInsecure