From f931c1d9a860c346322e644dfd213134c42fcd3e Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Sat, 1 Mar 2014 08:27:52 -0500 Subject: [PATCH] Remove nonce bits for now --- src/accounts/hatchet/sip/HatchetSip.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/accounts/hatchet/sip/HatchetSip.cpp b/src/accounts/hatchet/sip/HatchetSip.cpp index 99fc16e56..5e167095b 100644 --- a/src/accounts/hatchet/sip/HatchetSip.cpp +++ b/src/accounts/hatchet/sip/HatchetSip.cpp @@ -189,15 +189,8 @@ HatchetSipPlugin::webSocketConnected() hatchetAccount()->setConnectionState( Tomahawk::Accounts::Account::Connected ); m_sipState = AcquiringVersion; - m_uuid = QUuid::createUuid().toString(); - QCA::SecureArray sa( m_uuid.toLatin1() ); - QCA::SecureArray result = m_publicKey->encrypt( sa, QCA::EME_PKCS1_OAEP ); - - tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "uuid:" << m_uuid << ", size of uuid:" << m_uuid.size() << ", size of sa:" << sa.size() << ", size of result:" << result.size(); - QVariantMap nonceVerMap; nonceVerMap[ "version" ] = VERSION; - nonceVerMap[ "nonce" ] = QString( result.toByteArray().toBase64() ); sendBytes( nonceVerMap ); } @@ -275,10 +268,10 @@ HatchetSipPlugin::messageReceived( const QByteArray &msg ) if ( m_sipState == AcquiringVersion ) { - tLog() << Q_FUNC_INFO << "In acquiring version state, expecting version/nonce information"; - if ( !retMap.contains( "version" ) || !retMap.contains( "nonce" ) ) + tLog() << Q_FUNC_INFO << "In acquiring version state, expecting version information"; + if ( !retMap.contains( "version" ) ) { - tLog() << Q_FUNC_INFO << "Failed to acquire version or nonce information"; + tLog() << Q_FUNC_INFO << "Failed to acquire version information"; disconnectPlugin(); return; } @@ -291,13 +284,6 @@ HatchetSipPlugin::messageReceived( const QByteArray &msg ) return; } - if ( retMap[ "nonce" ].toString() != m_uuid ) - { - tLog() << Q_FUNC_INFO << "Failed to validate nonce"; - disconnectPlugin(); - return; - } - m_version = ver; QVariantMap registerMap;