找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 847|回复: 6

[DCMTK] DCMTK简介十一-dcmtls程序库

[复制链接]

293

主题

402

回帖

2565

积分

管理员

积分
2565

热心会员推广达人优秀版主荣誉管理论坛元老

发表于 2015-12-4 21:13:28 | 显示全部楼层 |阅读模式
本帖最后由 medimage 于 2015-12-4 21:29 编辑

十一、dcmtls程序库
dcmtls是网络库的安全扩展。This module contains classes that implement DICOM network communication tunneled through a Transport Layer Security (TLS) connection, conforming to the DICOM "Security Enhancements One" extension (formerly Supplement 31). This module requires the external OpenSSL library.
主要接口:
--DcmTLSTransportLayer: factory class which creates secure TLS transport layer connections and maintains the parameters common to all TLS transport connections in one application (e.g. the pool of trusted certificates, the key and certificate to be used for authentication and the list of ciphersuite to be used for association negotiation.)。在tlslayer.h文件中定义。
--DcmTLSConnection: this class represents a TLS (Transport Layer Security) V1 based secure transport connection.
举例:
--TLS的关联请求应用
T_ASC_Network *net;        // network initialization code not shown,
T_ASC_Parameters *params; // we just assume these pointers to be valid
// create TLS object that initializes the random generator through a file
// "random.dat" containing random data (1 kByte is sufficient).
DcmTLSTransportLayer *tLayer = new DcmTLSTransportLayer(
DICOM_APPLICATION_REQUESTOR, "random.dat");
if (TCS_ok != tLayer->setPrivateKeyFile("privkey.pem", SSL_FILETYPE_PEM))
{
cerr << "unable to load private key" << endl;
return;
}
if (TCS_ok != tLayer->setCertificateFile("certificate.pem", SSL_FILETYPE_PEM))
{
cerr << "unable to load certificate" << endl;
return;
}
// enable the TLS_RSA_WITH_3DES_EDE_CBC_SHA ciphersuite
tLayer->setCipherSuites(SSL3_TXT_RSA_DES_192_CBC3_SHA);
// accept any certificate from the remote site (not recommended)
tLayer->setCertificateVerification(DCV_ignoreCertificate);
// register and activate TLS layer
ASC_setTransportLayer(net, tLayer, 1);
ASC_setTransportLayerType(params, 1);

回复

使用道具 举报

138

主题

435

回帖

1500

积分

版主

积分
1500

热心会员推广达人优秀版主荣誉管理论坛元老

发表于 2016-5-11 20:06:00 | 显示全部楼层
谢谢分享
回复

使用道具 举报

62

主题

415

回帖

1349

积分

等待验证会员

积分
1349

热心会员推广达人优秀版主荣誉管理论坛元老

发表于 2016-5-14 13:20:14 | 显示全部楼层
看看!!!!!谢谢楼主!!!
回复

使用道具 举报

1

主题

436

回帖

1090

积分

版主

积分
1090

热心会员推广达人优秀版主荣誉管理论坛元老

发表于 2016-5-14 22:45:33 | 显示全部楼层
楼主太伟大了
回复

使用道具 举报

135

主题

405

回帖

1457

积分

版主

积分
1457

热心会员推广达人优秀版主荣誉管理论坛元老

发表于 2016-5-20 01:59:44 | 显示全部楼层
有谁试过啊!
回复

使用道具 举报

1

主题

400

回帖

819

积分

高级会员

积分
819

最佳新人

发表于 2016-5-20 15:55:22 | 显示全部楼层
谢谢LZ
回复

使用道具 举报

48

主题

382

回帖

1132

积分

版主

积分
1132

热心会员推广达人优秀版主荣誉管理论坛元老

发表于 2016-5-21 17:45:23 | 显示全部楼层
回复看下,!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|关于我们|医维基|网站地图|Archiver|手机版|医疗之家 ( 沪ICP备2023001278号-1 )

GMT+8, 2025-6-5 04:21 , Processed in 2.892902 second(s), 27 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表