ホーム › Security.Cryptography › CERT_REVOCATION_CHAIN_PARA
CERT_REVOCATION_CHAIN_PARA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||
|---|---|---|---|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | この構造体のサイズ (バイト単位)。 | ||||
| hChainEngine | HCERTCHAINENGINE | 8/4 | +8 | +4 | 呼び出し元が使用するチェーン エンジンへのハンドル。 | ||||
| hAdditionalStore | HCERTSTORE | 8/4 | +16 | +8 | 元のチェーンの構築に使用する証明書を格納するストアへのハンドル。このハンドルは NULL でもかまいません。 | ||||
| dwChainFlags | DWORD | 4 | +24 | +12 | CertGetCertificateChain 関数に渡す dwFlags パラメーターの値。
| ||||
| dwUrlRetrievalTimeout | DWORD | 4 | +28 | +16 | タイムアウトの制限をミリ秒単位で格納する値。0 の場合は、失効ハンドラーの既定のタイムアウトが使用されます。 | ||||
| pftCurrentTime | FILETIME* | 8/4 | +32 | +20 | 鮮度時刻のチェックに使用される FILETIME 構造体へのポインター。このポインターが NULL の場合、失効ハンドラーは現在の時刻を使用します。 | ||||
| pftCacheResync | FILETIME* | 8/4 | +40 | +24 | キャッシュされた情報の使用を制御する FILETIME 構造体へのポインター。この時刻より前にキャッシュされた情報は無効と見なされ、新しい情報が取得されます。この値を設定すると、レジストリで構成された CacheResync の時刻より優先されます。 | ||||
| cbMaxUrlRetrievalByteCount | DWORD | 4 | +48 | +28 | URL オブジェクトからダウンロードする最大バイト数を指定する DWORD 値。0 を指定した場合は制限がありません。 Windows Server 2008、Windows Vista、Windows Server 2003 および Windows XP: このメンバーはサポートされていません。 |
公式ドキュメント
CERT_REVOCATION_CHAIN_PARA 構造体は、独立したオンライン証明書状態プロトコル (OCSP) 応答署名者証明書のチェーンを構築するために使用するパラメーターを格納します。CERT_REVOCATION_PARA 構造体および CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO 構造体の定義には、この構造体への省略可能なポインターが含まれます。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// CERT_REVOCATION_CHAIN_PARA (x64 56 / x86 32 バイト)
typedef struct CERT_REVOCATION_CHAIN_PARA {
DWORD cbSize;
HCERTCHAINENGINE hChainEngine;
HCERTSTORE hAdditionalStore;
DWORD dwChainFlags;
DWORD dwUrlRetrievalTimeout;
FILETIME* pftCurrentTime;
FILETIME* pftCacheResync;
DWORD cbMaxUrlRetrievalByteCount;
} CERT_REVOCATION_CHAIN_PARA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CERT_REVOCATION_CHAIN_PARA
{
public uint cbSize;
public IntPtr hChainEngine;
public IntPtr hAdditionalStore;
public uint dwChainFlags;
public uint dwUrlRetrievalTimeout;
public IntPtr pftCurrentTime;
public IntPtr pftCacheResync;
public uint cbMaxUrlRetrievalByteCount;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CERT_REVOCATION_CHAIN_PARA
Public cbSize As UInteger
Public hChainEngine As IntPtr
Public hAdditionalStore As IntPtr
Public dwChainFlags As UInteger
Public dwUrlRetrievalTimeout As UInteger
Public pftCurrentTime As IntPtr
Public pftCacheResync As IntPtr
Public cbMaxUrlRetrievalByteCount As UInteger
End Structureimport ctypes
from ctypes import wintypes
class CERT_REVOCATION_CHAIN_PARA(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("hChainEngine", ctypes.c_void_p),
("hAdditionalStore", ctypes.c_void_p),
("dwChainFlags", wintypes.DWORD),
("dwUrlRetrievalTimeout", wintypes.DWORD),
("pftCurrentTime", ctypes.c_void_p),
("pftCacheResync", ctypes.c_void_p),
("cbMaxUrlRetrievalByteCount", wintypes.DWORD),
]#[repr(C)]
pub struct CERT_REVOCATION_CHAIN_PARA {
pub cbSize: u32,
pub hChainEngine: *mut core::ffi::c_void,
pub hAdditionalStore: *mut core::ffi::c_void,
pub dwChainFlags: u32,
pub dwUrlRetrievalTimeout: u32,
pub pftCurrentTime: *mut core::ffi::c_void,
pub pftCacheResync: *mut core::ffi::c_void,
pub cbMaxUrlRetrievalByteCount: u32,
}import "golang.org/x/sys/windows"
type CERT_REVOCATION_CHAIN_PARA struct {
cbSize uint32
hChainEngine uintptr
hAdditionalStore uintptr
dwChainFlags uint32
dwUrlRetrievalTimeout uint32
pftCurrentTime uintptr
pftCacheResync uintptr
cbMaxUrlRetrievalByteCount uint32
}type
CERT_REVOCATION_CHAIN_PARA = record
cbSize: DWORD;
hChainEngine: Pointer;
hAdditionalStore: Pointer;
dwChainFlags: DWORD;
dwUrlRetrievalTimeout: DWORD;
pftCurrentTime: Pointer;
pftCacheResync: Pointer;
cbMaxUrlRetrievalByteCount: DWORD;
end;const CERT_REVOCATION_CHAIN_PARA = extern struct {
cbSize: u32,
hChainEngine: ?*anyopaque,
hAdditionalStore: ?*anyopaque,
dwChainFlags: u32,
dwUrlRetrievalTimeout: u32,
pftCurrentTime: ?*anyopaque,
pftCacheResync: ?*anyopaque,
cbMaxUrlRetrievalByteCount: u32,
};type
CERT_REVOCATION_CHAIN_PARA {.bycopy.} = object
cbSize: uint32
hChainEngine: pointer
hAdditionalStore: pointer
dwChainFlags: uint32
dwUrlRetrievalTimeout: uint32
pftCurrentTime: pointer
pftCacheResync: pointer
cbMaxUrlRetrievalByteCount: uint32struct CERT_REVOCATION_CHAIN_PARA
{
uint cbSize;
void* hChainEngine;
void* hAdditionalStore;
uint dwChainFlags;
uint dwUrlRetrievalTimeout;
void* pftCurrentTime;
void* pftCacheResync;
uint cbMaxUrlRetrievalByteCount;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CERT_REVOCATION_CHAIN_PARA サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; hChainEngine : HCERTCHAINENGINE (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; hAdditionalStore : HCERTSTORE (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwChainFlags : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwUrlRetrievalTimeout : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pftCurrentTime : FILETIME* (+20, 4byte) varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; pftCacheResync : FILETIME* (+24, 4byte) varptr(st)+24 を基点に操作(4byte:入れ子/配列)
; cbMaxUrlRetrievalByteCount : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CERT_REVOCATION_CHAIN_PARA サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; hChainEngine : HCERTCHAINENGINE (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; hAdditionalStore : HCERTSTORE (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; dwChainFlags : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; dwUrlRetrievalTimeout : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; pftCurrentTime : FILETIME* (+32, 8byte) varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; pftCacheResync : FILETIME* (+40, 8byte) varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; cbMaxUrlRetrievalByteCount : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CERT_REVOCATION_CHAIN_PARA
#field int cbSize
#field intptr hChainEngine
#field intptr hAdditionalStore
#field int dwChainFlags
#field int dwUrlRetrievalTimeout
#field intptr pftCurrentTime
#field intptr pftCacheResync
#field int cbMaxUrlRetrievalByteCount
#endstruct
stdim st, CERT_REVOCATION_CHAIN_PARA ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize