ホーム › 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 で終わる Unicode 文字列へのポインター。 | ||||||
| pwszMoreInfoLocation | LPWSTR | 8/4 | +16 | +12 | ファイルに関する詳細情報の取得元となる場所を格納する、null で終わる Unicode 文字列へのポインター。この情報は、ファイルのダウンロード時に表示されます。 | ||||||
| pszHashAlg | LPSTR | 8/4 | +24 | +16 | 署名に使用されるハッシュ アルゴリズムのオブジェクト識別子 (OID) を格納する、null で終わる ANSI 文字列へのポインター。既定値は NULL で、SHA-1 ハッシュ アルゴリズムが使用されることを示します。 | ||||||
| pwszSigningCertDisplayString | LPWSTR | 8/4 | +32 | +20 | デジタル署名ウィザードのページに表示される文字列を格納する、null で終わる Unicode 文字列へのポインター。この文字列は、特定の目的に使用する証明書を選択するようユーザーに促す内容にしてください。 | ||||||
| hAdditionalCertStore | HCERTSTORE | 8/4 | +40 | +24 | 署名に追加される、追加の証明書ストアのハンドル。 | ||||||
| psAuthenticated | CRYPT_ATTRIBUTES* | 8/4 | +48 | +28 | ユーザーが指定した認証付き属性を格納する CRYPT_ATTRIBUTES 構造体へのポインター。 | ||||||
| psUnauthenticated | CRYPT_ATTRIBUTES* | 8/4 | +56 | +32 | ユーザーが指定した認証なし属性を格納する CRYPT_ATTRIBUTES 構造体へのポインター。 |
公式ドキュメント
[CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO 構造体は、「要件」セクションに示されているオペレーティング システムで使用できます。以降のバージョンでは変更されるか、使用できなくなる可能性があります。]
CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO 構造体は、署名に関する拡張情報を格納するために CRYPTUI_WIZ_DIGITAL_SIGN_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>
// 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