⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 suicacse.h

📁 ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包
💻 H
📖 第 1 页 / 共 3 页
字号:
  			         MMS_OBJ_ID *mech_name,  			   	 ST_INT *auth_value_len, 		           	 ST_CHAR **auth_value);  ST_RET (*set_mech_info) (MMS_OBJ_ID *mech_name, 	  	           ST_INT auth_value_len,		     	   ST_CHAR *auth_value,			   ST_INT *mech_info_len,			   ST_CHAR **mech_info);  ST_UINT (*set_asn_mask) (ST_UINT asn_mask);  ST_UINT (*get_asn_mask) (ST_UINT asn_mask);  ST_RET (*encrypt_assoc_req) (ST_CHAR *calling_context, 		               ST_INT in_len, ST_CHAR *in_buff,		      	       ST_INT *out_len, ST_CHAR **out_buff);  ST_RET (*encrypt_assoc_rsp) (ST_CHAR *responding_context, 		               ST_INT in_len, ST_CHAR *in_buff,		      	       ST_INT *out_len, ST_CHAR **out_buff);  ST_RET (*decrypt_assoc_req) (ST_CHAR *responding_context, 		               ST_INT in_len, ST_CHAR *in_buff,		      	       ST_INT *out_len, ST_CHAR **out_buff);  ST_RET (*decrypt_assoc_rsp) (ST_CHAR *calling_context, 		               ST_INT in_len, ST_CHAR *in_buff,		      	       ST_INT *out_len, ST_CHAR **out_buff);  ST_RET (*encrypt_data) (ST_CHAR *context, 		          ST_INT in_len, ST_CHAR *in_buff,		      	  ST_INT *out_len, ST_CHAR **out_buff);  ST_RET (*decrypt_data) (ST_CHAR *context, 		          ST_INT in_len, ST_CHAR *in_buff,		      	  ST_INT *out_len, ST_CHAR **out_buff);  ST_RET (*destroy_calling_context) (ST_CHAR *calling_context);  ST_RET (*destroy_responding_context) (ST_CHAR *responding_context);  } CRYPTO_INFO;/************************************************************************//* Structure used to store algo-specific information			*//************************************************************************/typedef struct algo_info  {  ST_INT algo_type;  MMS_OBJ_ID mech_name;  CRYPTO_INFO crypto_info;  } ALGO_INFO;extern ALGO_INFO algo_info_array[];#define ALGO_PASSWORD		0#define ALGO_DESCBC		1#define ALGO_OTHER		2ALGO_INFO *s_find_crypto (MMS_OBJ_ID *mech_name);/************************************************************************//* Handlers for Password-based algorithm				*//************************************************************************/ST_CHAR *mcp_create_calling_context (CRYPTO_CFG *crypto_cfg);ST_RET mcp_set_calling_auth (ST_CHAR *calling_context, 			     MMS_OBJ_ID *mech_name,			     ST_INT *auth_value_len, 	    	             ST_CHAR **auth_value);ST_RET mcp_set_mech_info (MMS_OBJ_ID *mech_name, 			  ST_INT auth_value_len,		     	  ST_CHAR *auth_value, 			  ST_INT *mech_info_len,		          ST_CHAR **mech_info);/************************************************************************//* Handlers for Password-based algorithm				*//************************************************************************/ST_CHAR *mcd_create_calling_context (CRYPTO_CFG *crypto_cfg);ST_CHAR *mcd_create_responding_context (MMS_OBJ_ID *mech_name, 	  			        ST_INT auth_value_len,		     		        ST_CHAR *auth_value);ST_RET mcd_set_calling_auth (ST_CHAR *calling_context, 			     MMS_OBJ_ID *mech_name,			     ST_INT *auth_value_len, 	    	             ST_CHAR **auth_value);ST_RET mcd_set_mech_info (MMS_OBJ_ID *mech_name, 			  ST_INT auth_value_len,		     	  ST_CHAR *auth_value, 			  ST_INT *mech_info_len,		          ST_CHAR **mech_info);ST_UINT mcd_set_asn_mask (ST_UINT asn_mask);ST_UINT mcd_get_asn_mask (ST_UINT asn_mask);ST_RET mcd_encrypt_assoc_req (ST_CHAR *calling_context, 	    	              ST_INT in_len, ST_CHAR *in_buff,		     	      ST_INT *out_len, ST_CHAR **out_buff);ST_RET mcd_encrypt_assoc_rsp (ST_CHAR *responding_context, 	    	              ST_INT in_len, ST_CHAR *in_buff,		     	      ST_INT *out_len, ST_CHAR **out_buff);ST_RET mcd_decrypt_assoc_req (ST_CHAR *responding_context, 	    	              ST_INT in_len, ST_CHAR *in_buff,		     	      ST_INT *out_len, ST_CHAR **out_buff);ST_RET mcd_decrypt_assoc_rsp (ST_CHAR *calling_context, 	    	              ST_INT in_len, ST_CHAR *in_buff,		     	      ST_INT *out_len, ST_CHAR **out_buff);ST_RET mcd_encrypt_data (ST_CHAR *context, 		         ST_INT in_len, ST_CHAR *in_buff,		         ST_INT *out_len, ST_CHAR **out_buff);ST_RET mcd_decrypt_data (ST_CHAR *context, 		         ST_INT in_len, ST_CHAR *in_buff,		         ST_INT *out_len, ST_CHAR **out_buff);ST_RET mcd_destroy_calling_context (ST_CHAR *calling_context);ST_RET mcd_destroy_responding_context (ST_CHAR *responding_context);/************************************************************************//* Structures used to store mechanism-specific information		*//************************************************************************/typedef struct passbased_info  {  ST_BOOLEAN passwd_pres;		/* password present flag */  ST_INT level;				/* password level */  ST_CHAR password[MAX_PASSWD_LEN];	/* actual password */  } PASSBASED_INFO;typedef struct descbc_info  {  MMS_OBJ_ID sender_id;			/* sender name */  MMS_OBJ_ID recip_id;			/* recipient name */  ST_INT index;	      			/* into local user key table */  ST_CHAR key[KEY_LENGTH];	      	/* actual key */  ST_CHAR iv[IV_LENGTH];		/* Initialization Vector */  ST_BOOLEAN passwd_pres;		/* password present flag */  ST_INT level;				/* password level */  ST_CHAR password[MAX_PASSWD_LEN];	/* actual password */  } DESCBC_INFO;/************************************************************************//* Security attack notification pointer					*//************************************************************************/#define SA_GENERAL				0#define SA_BAD_AUTH_VALUE			1#define SA_MASTER_KEY_NOT_CONFIGURED		2#define SA_AUTH_TOKEN_DECRYPT			3#define SA_RECIP_NAME				4#define SA_REPLAY				5#define SA_DECRYPT				6extern ST_VOID (*s_security_attack) (ST_INT chan, ST_INT reason);extern ST_INT sa_reason;#endif/************************************************************************//* The structure below is used to save the various info about the	*//* state of the channels on a per-channel basis.			*//* This structure is used to pass data.					*//************************************************************************/struct s_chan_info{  ST_LONG reserved;		/* reserved for SUIC			*/  ST_CHAR *name;			/* local name				*/  ST_INT transport;		/* TP4 vs. TCP/IP			*/  ST_UINT AP_ctxt_mask;		/* application context name mask   	*/  ST_BOOLEAN AP_title_pres;		/* present flag				*/  MMS_OBJ_ID AP_title;		/* AP title    				*/   ST_BOOLEAN AP_inv_id_pres;		/* present flag				*/  ST_INT32 AP_invoke_id;		/* AP invocation ID    			*/  ST_BOOLEAN AE_qual_pres;		/* present flag				*/  ST_INT32 AE_qual;			/* AE qualifier    			*/  ST_BOOLEAN AE_inv_id_pres;		/* present flag				*/  ST_INT32 AE_invoke_id;		/* AE invocation ID    			*/  ST_INT p_sel_len;		/* P-selector length			*/  ST_UCHAR p_sel[MAX_P_SEL];	/* P-selector				*/  ST_INT s_sel_len;		/* S-selector length			*/  ST_UCHAR s_sel[MAX_T_SEL];	/* S-selector				*/  ST_INT t_sel_len;		/* T-selector length			*/  ST_UCHAR t_sel[MAX_T_SEL];	/* T-selector				*/  ST_INT net_addr_len;		/* Network address length		*/  ST_UCHAR net_addr[MAX_N_SEL];	/* Network address			*/  ST_CHAR  ip_addr[HOST_NAME_LEN + 1];	/* TCP/IP dotted decimal or host name 	*/  ST_INT port;			/* TCP/IP port number			*/  ST_CHAR *part_name;		/* partner name				*/  ST_INT part_transport;	/* TP4 vs. TCP/IP			*/  ST_UINT part_AP_ctxt_mask;	/* partner application context name mask*/  ST_BOOLEAN part_AP_title_pres;	/* present flag				*/  MMS_OBJ_ID part_AP_title;	/* partner AP title    			*/  ST_BOOLEAN p_AP_inv_id_pres; 	/* present flag				*/  ST_INT32 part_AP_invoke_id; 	/* partner AP invocation ID    		*/  ST_BOOLEAN part_AE_qual_pres;	/* present flag				*/  ST_INT32 part_AE_qual;		/* partner AE qualifier   		*/  ST_BOOLEAN p_AE_inv_id_pres; 	/* present flag				*/  ST_INT32 part_AE_invoke_id; 	/* partner AE invocation ID		*/  ST_INT part_p_sel_len;		/* P-selector length			*/  ST_UCHAR part_p_sel[MAX_P_SEL];	/* P-selector				*/  ST_INT part_s_sel_len;		/* S-selector length			*/  ST_UCHAR part_s_sel[MAX_T_SEL];	/* S-selector				*/  ST_INT part_t_sel_len;		/* T-selector length			*/  ST_UCHAR part_t_sel[MAX_T_SEL];	/* T-selector				*/  ST_INT part_net_addr_len;		/* Network address length	*/  ST_UCHAR part_net_addr[MAX_N_SEL];	/* Network address		*/  ST_CHAR  part_ip_addr[HOST_NAME_LEN + 1];/* TCP/IP dotted decimal or host name */  ST_INT part_port;			/* TCP/IP port number			*/  ST_INT state_mask;		/* association state mask		*/#ifdef SECURITY_SUPPORT  ST_INT algo_type;		/* Type of encryption method		*/  MMS_OBJ_ID mech_name;		/* mechanism name			*/  ST_INT auth_value_len;	/* length of ASN.1 authentication value	*/  ST_CHAR *auth_value;		/* ASN.1 authentication value		*/  CRYPTO_CFG *crypto_cfg;	/* Crypto Config structure		*/  CRYPTO_INFO *crypto_info;	/* Crypto Info structure		*/  ST_CHAR *calling_context;	/* Calling security context		*/  ST_CHAR *responding_context;	/* Responding security context		*/#endif#ifdef DECNP5  ST_BOOLEAN already_gave_buffers;	/* OSAK doesn't need any more buffers.	*/#endif} ;typedef struct s_chan_info CHAN_INFO;extern CHAN_INFO *s_chan_info;/************************************************************************//* The structure below is used to save the various info about the	*//* state of the association on a channel-by-channel basis.		*//* This structure is used to receive data.				*//************************************************************************/struct acse_ar_info  {  ST_LONG reserved1;	             	/* reserved for provider use    */  ST_CHAR *ar_name;	         	/* local name                   */  ST_INT transport;			/* TP4 vs. TCP/IP		*/  ST_UINT AP_ctxt_mask;	           	/* reserved for provider use	*/  ST_INT AP_title_form;          	/* 0 == form 1, 1 == form 2	*/  ST_BOOLEAN AP_title_pres;          	/* present flag                 */  MMS_OBJ_ID AP_title;          	/* AP title                     */  ST_BOOLEAN AP_inv_id_pres;         	/* present flag                 */  ST_INT32 AP_invoke_id;            	/* AP invocation ID             */  ST_BOOLEAN AE_qual_pres;           	/* present flag                 */  ST_INT32 AE_qual;                 	/* AE qualifier                 */  ST_BOOLEAN AE_inv_id_pres;         	/* present flag                 */  ST_INT32 AE_invoke_id;            	/* AE invocation ID             */  ST_INT p_sel_len;			/* P-selector length		*/  ST_UCHAR p_sel[MAX_P_SEL];		/* P-selector			*/  ST_INT s_sel_len;			/* S-selector length		*/  ST_UCHAR s_sel[MAX_T_SEL];		/* S-selector			*/  ST_INT t_sel_len;			/* T-selector length		*/  ST_UCHAR t_sel[MAX_T_SEL];		/* T-selector			*/  ST_INT net_addr_len;			/* Network address length	*/  ST_UCHAR net_addr[MAX_N_SEL];		/* Network address		*/  ST_CHAR  ip_addr[HOST_NAME_LEN + 1];	/* TCP/IP dotted decimal or host name 	*/  ST_BOOLEAN part_name_found;        	/* partner name found in DIB     */  ST_CHAR *part_ar_name;        		/* partner name                 */  ST_UINT part_AP_ctxt_mask;		/* reserved for provider	*/  ST_INT part_AP_title_form;          	/* 0 == form 1, 1 == form 2	*/  ST_BOOLEAN part_AP_title_pres;     	/* present flag                 */  MMS_OBJ_ID part_AP_title;     	/* partner AP title             */  ST_BOOLEAN part_AP_inv_id_pres;       	/* present flag                 */  ST_INT32 part_AP_invoke_id;       	/* partner AP invocation ID     */  ST_BOOLEAN part_AE_qual_pres;      	/* present flag                 */  ST_INT32 part_AE_qual;            	/* partner AE qualifier         */  ST_BOOLEAN part_AE_inv_id_pres;       	/* present flag                 */  ST_INT32 part_AE_invoke_id;       	/* partner AE invocation ID     */  ST_INT pci_mask;               	/* reserved for provider	*/  ST_INT part_p_sel_len;			/* P-selector length		*/  ST_UCHAR part_p_sel[MAX_P_SEL];		/* P-selector			*/  ST_INT part_s_sel_len;			/* S-selector length		*/  ST_UCHAR part_s_sel[MAX_T_SEL];		/* S-selector			*/  ST_INT part_t_sel_len;			/* T-selector length		*/  ST_UCHAR part_t_sel[MAX_T_SEL];		/* T-selector			*/  ST_INT part_net_addr_len;		/* Network address length	*/  ST_UCHAR part_net_addr[MAX_N_SEL];	/* Network address		*/  ST_CHAR part_ip_addr[HOST_NAME_LEN + 1];	/* TCP/IP dotted decimal or host name 	*/#ifdef SECURITY_SUPPORT  ST_BOOLEAN secure_assoc;		/* True if this is a secure association	*/  ST_INT algo_type;		/* Type of encryption method		*/  MMS_OBJ_ID mech_name;		/* mechanism name			*/  ST_INT auth_value_len;	/* length of ASN.1 authentication value	*/  ST_CHAR *auth_value;		/* ASN.1 authentication value		*/  MMS_OBJ_ID part_mech_name;	/* mechanism name			*/  ST_INT part_auth_value_len;	/* length of ASN.1 authentication value	*/  ST_CHAR *part_auth_value;	/* ASN.1 authentication value		*/  ST_INT mech_info_len;	/* Length of Mechanism specific struct	*/  ST_CHAR *mech_info;		/* Mechanism specific structure		*/#endif  };typedef struct acse_ar_info ACSE_AR_INFO;	/* used by MMS		*/typedef struct acse_ar_info ASS_INFO;		/* used by SUIC		*/extern ASS_INFO *s_ass_info;/************************************************************************//* The structure below is used to represent Abstract Syntax Names that	*//* may be used by the application.					*//************************************************************************/extern MMS_OBJ_ID *asn_table;#if !defined (SECURITY_SUPPORT)#define ASN_USER_BASE	3	/* where user-defined names begin	*/#else#define ASN_USER_BASE	4	/* where user-defined names begin	*/#endif/************************************************************************//* The structure below is used to represent Transfer Syntax Names that	*//* may be used by the application.					*//************************************************************************/extern MMS_OBJ_ID *tsn_table;#define TSN_USER_BASE	1	/* where user-defined names begin	*//************************************************************************//* The structure below is used to represent Application Context Names 	*//* that	may be used by the application.					*//************************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -