medimage 发表于 2015-12-4 21:13:28

DCMTK简介十一-dcmtls程序库

本帖最后由 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 ciphersuitetLayer->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 layerASC_setTransportLayer(net, tLayer, 1);ASC_setTransportLayerType(params, 1);

RTphysics 发表于 2016-5-11 20:06:00

谢谢分享

medtech 发表于 2016-5-14 13:20:14

看看!!!!!谢谢楼主!!!

dentaldev 发表于 2016-5-14 22:45:33

楼主太伟大了

江西魏工 发表于 2016-5-20 01:59:44

有谁试过啊!

13636600141 发表于 2016-5-20 15:55:22

谢谢LZ

medct 发表于 2016-5-21 17:45:23

回复看下,!!
页: [1]
查看完整版本: DCMTK简介十一-dcmtls程序库