// NetPassword.cpp: implementation of the CNetPassword class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "NetPassword.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif extern CDICOMSRVApp theApp; class CDICOMSRVDlg; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CNetPassword::CNetPassword() : LDicomNet((L_CHAR*)(LPCTSTR) theApp.m_sTempFilesFolder, DICOM_SECURE_TLS) { m_nValidPassword = FALSE; } CNetPassword::~CNetPassword() { } L_INT CNetPassword::OnPrivateKeyPassword(L_CHAR *pszPassword, L_INT nSize, L_INT uFlag) { if (!m_nValidPassword) { CPasswordDlg dlg; dlg.m_strPassword = "test"; dlg.DoModal(); m_nValidPassword = TRUE; theApp.m_strPrivateKeyPassword = dlg.m_strPassword; } strncpy(pszPassword, theApp.m_strPrivateKeyPassword, nSize); return theApp.m_strPrivateKeyPassword.GetLength(); }