語言

X509Certificate.BasicConstraints 屬性

定義

回傳擴充套件中 BasicContraints 憑證約束的路徑長度。

public abstract int BasicConstraints { [Android.Runtime.Register("getBasicConstraints", "()I", "GetGetBasicConstraintsHandler")] get; }
[<get: Android.Runtime.Register("getBasicConstraints", "()I", "GetGetBasicConstraintsHandler")>]
member this.BasicConstraints : int

屬性值

若憑證中有 BasicConstraints 擴充,且憑證主體為 CA,則為 pathLenConstraint 的值,否則為 -1。 若憑證主體為 CA 且未出現 pathLenConstraint,則回傳 Integer.MAX_VALUE 以表示認證路徑的允許長度無限制。

屬性

備註

從關鍵的 BasicConstraints 擴充檔取得憑證約束路徑長度(OID = 2.5.29.19)。 基本限制擴充則識別憑證的主體是否為憑證授權機構(CA),以及透過該憑證授權機構的認證路徑可能存在多深。 pathLenConstraint 欄位(見下文)只有在 cA 設為 TRUE 時才有意義。 此時,它會列出在認證路徑上可跟隨該證書的最大數量CA證書。 值為零表示路徑中只能跟隨終端實體憑證。

BasicConstraints ::= SEQUENCE {
    cA                  BOOLEAN DEFAULT FALSE,
    pathLenConstraint   INTEGER (0..MAX) OPTIONAL }

Java 參考 java.security.cert.X509Certificate.getBasicConstraints。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於