ホーム › Security.Cryptography.UI › CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO
CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwSize | DWORD | 4 | +0 | +0 | この構造体のバイト数。呼び出し前に設定する。 |
| dwAttrFlags | CRYPTUI_WIZ_DIGITAL_SIGN_SIG_TYPE | 4 | +4 | +4 | 署名属性を制御するフラグ。コミット時署名等の署名種別を指定する。 |
| pwszDescription | LPWSTR | 8/4 | +8 | +8 | 署名内容の説明文字列。NULL可。 |
| pwszMoreInfoLocation | LPWSTR | 8/4 | +16 | +12 | 詳細情報を示すURL等の場所文字列。NULL可。 |
| pszHashAlg | LPSTR | 8/4 | +24 | +16 | 署名に使うハッシュアルゴリズムのOID文字列。NULLで既定値。 |
| pwszSigningCertDisplayString | LPWSTR | 8/4 | +32 | +20 | 署名証明書の表示用文字列。NULL可。 |
| hAdditionalCertStore | HCERTSTORE | 8/4 | +40 | +24 | 署名に含める追加証明書のストアハンドル。NULL可。 |
| psAuthenticated | CRYPT_ATTRIBUTES* | 8/4 | +48 | +28 | 署名に含める認証済み属性集合へのポインタ。NULL可。 |
| psUnauthenticated | CRYPT_ATTRIBUTES* | 8/4 | +56 | +32 | 署名に含める非認証属性集合へのポインタ。NULL可。 |
各言語での定義
#include <windows.h>
// CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO (x64 64 / x86 36 バイト)
typedef struct CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO {
DWORD dwSize;
CRYPTUI_WIZ_DIGITAL_SIGN_SIG_TYPE dwAttrFlags;
LPWSTR pwszDescription;
LPWSTR pwszMoreInfoLocation;
LPSTR pszHashAlg;
LPWSTR pwszSigningCertDisplayString;
HCERTSTORE hAdditionalCertStore;
CRYPT_ATTRIBUTES* psAuthenticated;
CRYPT_ATTRIBUTES* psUnauthenticated;
} CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO
{
public uint dwSize;
public uint dwAttrFlags;
public IntPtr pwszDescription;
public IntPtr pwszMoreInfoLocation;
public IntPtr pszHashAlg;
public IntPtr pwszSigningCertDisplayString;
public IntPtr hAdditionalCertStore;
public IntPtr psAuthenticated;
public IntPtr psUnauthenticated;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO
Public dwSize As UInteger
Public dwAttrFlags As UInteger
Public pwszDescription As IntPtr
Public pwszMoreInfoLocation As IntPtr
Public pszHashAlg As IntPtr
Public pwszSigningCertDisplayString As IntPtr
Public hAdditionalCertStore As IntPtr
Public psAuthenticated As IntPtr
Public psUnauthenticated As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("dwAttrFlags", wintypes.DWORD),
("pwszDescription", ctypes.c_void_p),
("pwszMoreInfoLocation", ctypes.c_void_p),
("pszHashAlg", ctypes.c_void_p),
("pwszSigningCertDisplayString", ctypes.c_void_p),
("hAdditionalCertStore", ctypes.c_void_p),
("psAuthenticated", ctypes.c_void_p),
("psUnauthenticated", ctypes.c_void_p),
]#[repr(C)]
pub struct CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO {
pub dwSize: u32,
pub dwAttrFlags: u32,
pub pwszDescription: *mut core::ffi::c_void,
pub pwszMoreInfoLocation: *mut core::ffi::c_void,
pub pszHashAlg: *mut core::ffi::c_void,
pub pwszSigningCertDisplayString: *mut core::ffi::c_void,
pub hAdditionalCertStore: *mut core::ffi::c_void,
pub psAuthenticated: *mut core::ffi::c_void,
pub psUnauthenticated: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO struct {
dwSize uint32
dwAttrFlags uint32
pwszDescription uintptr
pwszMoreInfoLocation uintptr
pszHashAlg uintptr
pwszSigningCertDisplayString uintptr
hAdditionalCertStore uintptr
psAuthenticated uintptr
psUnauthenticated uintptr
}type
CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO = record
dwSize: DWORD;
dwAttrFlags: DWORD;
pwszDescription: Pointer;
pwszMoreInfoLocation: Pointer;
pszHashAlg: Pointer;
pwszSigningCertDisplayString: Pointer;
hAdditionalCertStore: Pointer;
psAuthenticated: Pointer;
psUnauthenticated: Pointer;
end;const CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO = extern struct {
dwSize: u32,
dwAttrFlags: u32,
pwszDescription: ?*anyopaque,
pwszMoreInfoLocation: ?*anyopaque,
pszHashAlg: ?*anyopaque,
pwszSigningCertDisplayString: ?*anyopaque,
hAdditionalCertStore: ?*anyopaque,
psAuthenticated: ?*anyopaque,
psUnauthenticated: ?*anyopaque,
};type
CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO {.bycopy.} = object
dwSize: uint32
dwAttrFlags: uint32
pwszDescription: pointer
pwszMoreInfoLocation: pointer
pszHashAlg: pointer
pwszSigningCertDisplayString: pointer
hAdditionalCertStore: pointer
psAuthenticated: pointer
psUnauthenticated: pointerstruct CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO
{
uint dwSize;
uint dwAttrFlags;
void* pwszDescription;
void* pwszMoreInfoLocation;
void* pszHashAlg;
void* pwszSigningCertDisplayString;
void* hAdditionalCertStore;
void* psAuthenticated;
void* psUnauthenticated;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO サイズ: 36 バイト(x86)
dim st, 9 ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwAttrFlags : CRYPTUI_WIZ_DIGITAL_SIGN_SIG_TYPE (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pwszDescription : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pwszMoreInfoLocation : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pszHashAlg : LPSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pwszSigningCertDisplayString : LPWSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; hAdditionalCertStore : HCERTSTORE (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; psAuthenticated : CRYPT_ATTRIBUTES* (+28, 4byte) varptr(st)+28 を基点に操作(4byte:入れ子/配列)
; psUnauthenticated : CRYPT_ATTRIBUTES* (+32, 4byte) varptr(st)+32 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO サイズ: 64 バイト(x64)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwAttrFlags : CRYPTUI_WIZ_DIGITAL_SIGN_SIG_TYPE (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pwszDescription : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; pwszMoreInfoLocation : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pszHashAlg : LPSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pwszSigningCertDisplayString : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; hAdditionalCertStore : HCERTSTORE (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; psAuthenticated : CRYPT_ATTRIBUTES* (+48, 8byte) varptr(st)+48 を基点に操作(8byte:入れ子/配列)
; psUnauthenticated : CRYPT_ATTRIBUTES* (+56, 8byte) varptr(st)+56 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO
#field int dwSize
#field int dwAttrFlags
#field intptr pwszDescription
#field intptr pwszMoreInfoLocation
#field intptr pszHashAlg
#field intptr pwszSigningCertDisplayString
#field intptr hAdditionalCertStore
#field intptr psAuthenticated
#field intptr psUnauthenticated
#endstruct
stdim st, CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize