YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
#include"handshake.h"
/** Handshake class implementation **********************************/
// Obtain credentials for the authentication handshake.
ret= AcquireCredentialsHandle(NULL, (SEC_CHAR*)ssp,
side == SERVER ? SECPKG_CRED_INBOUND : SECPKG_CRED_OUTBOUND,
NULL, NULL, NULL, NULL, &m_cred, &m_expire);
if (ret != SEC_E_OK)
{
DBUG_PRINT("error", ("AcqireCredentialsHandle() failed" " with error %X", ret));
ERROR_LOG(ERROR, ("Could not obtain local credentials" " required for authentication"));
m_error= ret;
}
m_have_credentials= true;
}
Handshake::~Handshake()
{ if (m_have_credentials)
FreeCredentialsHandle(&m_cred); if (m_have_sec_context)
DeleteSecurityContext(&m_sctx);
m_output.free();
#ifndef DBUG_OFF if (m_ssp_info)
FreeContextBuffer(m_ssp_info); #endif
}
if (!new_data.is_null())
{
DBUG_PRINT("info", ("Round %d started", m_round));
DBUG_PRINT("info", ("Sending packet of length %d", new_data.len())); int ret= write_packet(new_data); if (ret)
{
ERROR_LOG(ERROR, ("Error writing packet in round %d", m_round)); return1;
}
DBUG_PRINT("info", ("Data sent"));
} elseif (!is_complete())
{
ERROR_LOG(ERROR, ("No data to send in round %d" " but handshake is not complete", m_round)); return1;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.