-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
authored and
unknown
committed
Jan 26, 2010
1 parent
eb07c0b
commit 84163fd
Showing
16 changed files
with
118 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/** | ||
* This file is part of Pandion. | ||
* | ||
* Pandion is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Pandion is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Pandion. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Filename: SCRAM.cpp | ||
* Author(s): Dries Staelens | ||
* Copyright: Copyright (c) 2009 Dries Staelens | ||
* Description: This file implements some helper methods for authenticating | ||
* using the Salted Challenge Response (SCRAM) SASL mechanism. | ||
* See http://tools.ietf.org/html/draft-ietf-sasl-scram-10 | ||
*/ | ||
#include "stdafx.h" | ||
#include "SCRAM.h" | ||
#include "Base64.h" | ||
#include "UTF8.h" | ||
|
||
SCRAM::SCRAM() | ||
{ | ||
} | ||
SCRAM::~SCRAM() | ||
{ | ||
} | ||
STDMETHODIMP SCRAM::GenerateResponse(BSTR Challenge, BSTR *Response) | ||
{ | ||
return E_NOTIMPL; | ||
} | ||
void SCRAM::Error(LPWSTR Where, LPWSTR WhenCalling, DWORD ErrorCode) | ||
{ | ||
LPTSTR ErrorMessage; | ||
::FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | | ||
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_MAX_WIDTH_MASK, | ||
NULL, ErrorCode, 0, (LPTSTR)&ErrorMessage, 0, NULL); | ||
std::wostringstream dbgMsg; | ||
dbgMsg << L"SCRAM error in " << Where << | ||
L" when calling " << WhenCalling << | ||
std::hex << std::setw(8) << std::setfill(L'0') << | ||
L": (ERROR 0x" << ErrorCode << L") " << | ||
ErrorMessage << std::endl; | ||
OutputDebugString(dbgMsg.str().c_str()); | ||
::LocalFree(ErrorMessage); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* This file is part of Pandion. | ||
* | ||
* Pandion is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Pandion is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Pandion. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Filename: SCRAM.h | ||
* Author(s): Dries Staelens | ||
* Copyright: Copyright (c) 2010 Dries Staelens | ||
* Description: This header defines some helper methods for authenticating | ||
* using the Salted Challenge Response (SCRAM) SASL mechanism. | ||
* See http://tools.ietf.org/html/draft-ietf-sasl-scram-10 | ||
*/ | ||
|
||
#pragma once | ||
#include "DispInterfaceImpl.h" | ||
|
||
class SCRAM : | ||
public DispInterfaceImpl<ISCRAM> | ||
{ | ||
public: | ||
SCRAM(); | ||
~SCRAM(); | ||
|
||
STDMETHOD(GenerateResponse)(BSTR Challenge, BSTR *Response); | ||
private: | ||
void Error(LPWSTR Where, LPWSTR WhenCalling, DWORD ErrorCode); | ||
}; |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.