自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
SuplCertificateInterface 結構體參考資料
#include <
gps.h
>
AGPS 介面,用於處理 SUPL 憑證作業
定義位於檔案
gps.h
的
978
行。
安裝一組用於 SUPL 連線至 A-GPS 伺服器的憑證。如有需要,HAL 應在內部找出需要移除的憑證,以便安裝憑證。安裝的憑證代表連線至 AGPS SUPL 伺服器所需的完整有效憑證組合。嘗試與 AGPS 伺服器建立連線時,必須提供憑證清單,且所有憑證都必須同時可用。
參數:certificates - 指向 DER 編碼憑證陣列的指標,這些憑證需要在 HAL 中安裝。length - 要安裝的憑證數量。傳回值:如果作業順利完成,則傳回 AGPS_CERTIFICATE_OPERATION_SUCCESS;如果 HAL 無法儲存嘗試安裝的憑證數量,則傳回 AGPS_CERTIFICATE_ERROR_TOO_MANY_CERTIFICATES;如果儲存的憑證狀態與此錯誤案例中的狀態相同,則傳回 AGPS_CERTIFICATE_ERROR_TOO_MANY_CERTIFICATES。
重要事項:如有需要,HAL 應在內部找出需要移除的憑證組合,以便安裝憑證。
定義位於檔案
gps.h
的
1005
行。
通知 HAL,已撤銷用於 SUPL 連線的憑證清單。系統會從 HAL 的內部儲存庫中移除指定的憑證組合。
參數:指紋 - 指向 SHA1 指紋陣列的指標,用於識別要撤銷的憑證組合。長度 - 提供的指紋數量。傳回值:如果作業順利完成,則為 AGPS_CERTIFICATE_OPERATION_SUCCESS。
重要事項:如果 HAL 無法辨識透過指紋提供的任何憑證,應忽略該憑證,並繼續撤銷/刪除其餘憑證。
定義位於檔案
gps.h
的
1022
行。
設為 sizeof(SuplCertificateInterface)
定義位於檔案
gps.h
的
980
行。
這個結構體的說明文件是由下列檔案產生:
-
hardware/libhardware/include/hardware/
gps.h
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Android Hardware Abstraction Layer: SuplCertificateInterface Struct Reference\n\nSuplCertificateInterface Struct Reference\n=========================================\n\n[Data Fields](#pub-attribs) \nSuplCertificateInterface Struct Reference \n\n`\n#include \u003c\n`[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)`\n\u003e\n`\n\n|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| size_t | [size](/reference/hal/struct_supl_certificate_interface#a854352f53b148adc24983a58a1866d66) |\n| ||\n| int(\\* | [install_certificates](/reference/hal/struct_supl_certificate_interface#a9208ffa455b013091db3afa2abc2a1a3) )(const [DerEncodedCertificate](/reference/hal/struct_der_encoded_certificate) \\*certificates, size_t length) |\n| ||\n| int(\\* | [revoke_certificates](/reference/hal/struct_supl_certificate_interface#a6c541c29aa9f7a5fb5f44ce4283e98e3) )(const [Sha1CertificateFingerprint](/reference/hal/struct_sha1_certificate_fingerprint) \\*fingerprints, size_t length) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nAGPS Interface to handle SUPL certificate operations\n\n\nDefinition at line\n[978](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\nField Documentation\n-------------------\n\n\n|------------------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* install_certificates)(const [DerEncodedCertificate](/reference/hal/struct_der_encoded_certificate) \\*certificates, size_t length) |\n\n\nInstalls a set of Certificates used for SUPL connections to the AGPS server. If needed the HAL should find out internally any certificates that need to be removed to accommodate the certificates to install. The certificates installed represent a full set of valid certificates needed to connect to AGPS SUPL servers. The list of certificates is required, and all must be available at the same time, when trying to establish a connection with the AGPS Server.\n\n\nParameters: certificates - A pointer to an array of DER encoded certificates that are need to be installed in the HAL. length - The number of certificates to install. Returns: AGPS_CERTIFICATE_OPERATION_SUCCESS if the operation is completed successfully AGPS_CERTIFICATE_ERROR_TOO_MANY_CERTIFICATES if the HAL cannot store the number of certificates attempted to be installed, the state of the certificates stored should remain the same as before on this error case.\n\n\nIMPORTANT: If needed the HAL should find out internally the set of certificates that need to be removed to accommodate the certificates to install.\n\n\nDefinition at line\n[1005](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* revoke_certificates)(const [Sha1CertificateFingerprint](/reference/hal/struct_sha1_certificate_fingerprint) \\*fingerprints, size_t length) |\n\n\nNotifies the HAL that a list of certificates used for SUPL connections are revoked. It is expected that the given set of certificates is removed from the internal store of the HAL.\n\n\nParameters: fingerprints - A pointer to an array of SHA1 Fingerprints to identify the set of certificates to revoke. length - The number of fingerprints provided. Returns: AGPS_CERTIFICATE_OPERATION_SUCCESS if the operation is completed successfully.\n\n\nIMPORTANT: If any of the certificates provided (through its fingerprint) is not known by the HAL, it should be ignored and continue revoking/deleting the rest of them.\n\n\nDefinition at line\n[1022](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|-------------|\n| size_t size |\n\n\nset to sizeof(SuplCertificateInterface)\n\n\nDefinition at line\n[980](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)"]]