ホーム › 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 | 失効チェーン構築に使うチェーンエンジンのハンドル。NULL可。 |
| hAdditionalStore | HCERTSTORE | 8/4 | +16 | +8 | 失効チェーンに使う追加証明書ストアのハンドル。NULL可。 |
| dwChainFlags | DWORD | 4 | +24 | +12 | 失効チェーン構築を制御するフラグ。 |
| dwUrlRetrievalTimeout | DWORD | 4 | +28 | +16 | URL取得のタイムアウト(ミリ秒単位)。0で既定値。 |
| pftCurrentTime | FILETIME* | 8/4 | +32 | +20 | 失効確認に使う現在時刻へのポインタ。NULLで実時刻。 |
| pftCacheResync | FILETIME* | 8/4 | +40 | +24 | キャッシュ再同期の基準時刻へのポインタ。NULL可。 |
| cbMaxUrlRetrievalByteCount | DWORD | 4 | +48 | +28 | URLから取得する最大バイト数。0で既定値。 |
各言語での定義
#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