医站点医维基

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1058|回复: 6

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

[复制链接]

336

主题

411

回帖

2808

积分

管理员

积分
2808

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

发表于 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

主题

436

回帖

1502

积分

版主

积分
1502

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

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

使用道具 举报

62

主题

417

回帖

1353

积分

版主

积分
1353

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

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

使用道具 举报

1

主题

441

回帖

1100

积分

版主

积分
1100

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

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

使用道具 举报

135

主题

407

回帖

1461

积分

版主

积分
1461

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

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

使用道具 举报

1

主题

412

回帖

843

积分

高级会员

积分
843

最佳新人

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

使用道具 举报

48

主题

387

回帖

1142

积分

版主

积分
1142

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

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-8 12:03 , Processed in 0.162023 second(s), 28 queries .

Designed by Medical BBS

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