ホーム › Networking.HttpServer › HTTP_SSL_PROTOCOL_INFO
HTTP_SSL_PROTOCOL_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Protocol | DWORD | 4 | +0 | +0 | 使用されたSSL/TLSプロトコルを示すフラグ値である。 |
| CipherType | DWORD | 4 | +4 | +4 | 使用された暗号(Cipher)の種別を示す値である。 |
| CipherStrength | DWORD | 4 | +8 | +8 | 暗号の強度(ビット数)である。 |
| HashType | DWORD | 4 | +12 | +12 | 使用されたハッシュアルゴリズムの種別を示す値である。 |
| HashStrength | DWORD | 4 | +16 | +16 | ハッシュの強度(ビット数)である。 |
| KeyExchangeType | DWORD | 4 | +20 | +20 | 使用された鍵交換アルゴリズムの種別を示す値である。 |
| KeyExchangeStrength | DWORD | 4 | +24 | +24 | 鍵交換の強度(ビット数)である。 |
各言語での定義
#include <windows.h>
// HTTP_SSL_PROTOCOL_INFO (x64 28 / x86 28 バイト)
typedef struct HTTP_SSL_PROTOCOL_INFO {
DWORD Protocol;
DWORD CipherType;
DWORD CipherStrength;
DWORD HashType;
DWORD HashStrength;
DWORD KeyExchangeType;
DWORD KeyExchangeStrength;
} HTTP_SSL_PROTOCOL_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct HTTP_SSL_PROTOCOL_INFO
{
public uint Protocol;
public uint CipherType;
public uint CipherStrength;
public uint HashType;
public uint HashStrength;
public uint KeyExchangeType;
public uint KeyExchangeStrength;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure HTTP_SSL_PROTOCOL_INFO
Public Protocol As UInteger
Public CipherType As UInteger
Public CipherStrength As UInteger
Public HashType As UInteger
Public HashStrength As UInteger
Public KeyExchangeType As UInteger
Public KeyExchangeStrength As UInteger
End Structureimport ctypes
from ctypes import wintypes
class HTTP_SSL_PROTOCOL_INFO(ctypes.Structure):
_fields_ = [
("Protocol", wintypes.DWORD),
("CipherType", wintypes.DWORD),
("CipherStrength", wintypes.DWORD),
("HashType", wintypes.DWORD),
("HashStrength", wintypes.DWORD),
("KeyExchangeType", wintypes.DWORD),
("KeyExchangeStrength", wintypes.DWORD),
]#[repr(C)]
pub struct HTTP_SSL_PROTOCOL_INFO {
pub Protocol: u32,
pub CipherType: u32,
pub CipherStrength: u32,
pub HashType: u32,
pub HashStrength: u32,
pub KeyExchangeType: u32,
pub KeyExchangeStrength: u32,
}import "golang.org/x/sys/windows"
type HTTP_SSL_PROTOCOL_INFO struct {
Protocol uint32
CipherType uint32
CipherStrength uint32
HashType uint32
HashStrength uint32
KeyExchangeType uint32
KeyExchangeStrength uint32
}type
HTTP_SSL_PROTOCOL_INFO = record
Protocol: DWORD;
CipherType: DWORD;
CipherStrength: DWORD;
HashType: DWORD;
HashStrength: DWORD;
KeyExchangeType: DWORD;
KeyExchangeStrength: DWORD;
end;const HTTP_SSL_PROTOCOL_INFO = extern struct {
Protocol: u32,
CipherType: u32,
CipherStrength: u32,
HashType: u32,
HashStrength: u32,
KeyExchangeType: u32,
KeyExchangeStrength: u32,
};type
HTTP_SSL_PROTOCOL_INFO {.bycopy.} = object
Protocol: uint32
CipherType: uint32
CipherStrength: uint32
HashType: uint32
HashStrength: uint32
KeyExchangeType: uint32
KeyExchangeStrength: uint32struct HTTP_SSL_PROTOCOL_INFO
{
uint Protocol;
uint CipherType;
uint CipherStrength;
uint HashType;
uint HashStrength;
uint KeyExchangeType;
uint KeyExchangeStrength;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; HTTP_SSL_PROTOCOL_INFO サイズ: 28 バイト(x64)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; Protocol : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; CipherType : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; CipherStrength : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; HashType : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; HashStrength : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; KeyExchangeType : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; KeyExchangeStrength : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global HTTP_SSL_PROTOCOL_INFO
#field int Protocol
#field int CipherType
#field int CipherStrength
#field int HashType
#field int HashStrength
#field int KeyExchangeType
#field int KeyExchangeStrength
#endstruct
stdim st, HTTP_SSL_PROTOCOL_INFO ; NSTRUCT 変数を確保
st->Protocol = 100
mes "Protocol=" + st->Protocol