summaryrefslogtreecommitdiffabout
path: root/lib/consumer.cc
authorMichael Krelin <hacker@klever.net>2007-01-12 12:58:25 (UTC)
committer Michael Krelin <hacker@klever.net>2007-01-12 12:58:25 (UTC)
commite79687a3d9a1631613de02d8e12bae36302b46ab (patch) (unidiff)
tree4238c0d8d61f5e70ed1e98debb01315babb21686 /lib/consumer.cc
parent4cc2e58186e8cd9b96a3573c92f6664064cf11fe (diff)
downloadlibopkele-e79687a3d9a1631613de02d8e12bae36302b46ab.zip
libopkele-e79687a3d9a1631613de02d8e12bae36302b46ab.tar.gz
libopkele-e79687a3d9a1631613de02d8e12bae36302b46ab.tar.bz2
eliminated mimetic dependency and made use of openssl base64 encoder instead
Diffstat (limited to 'lib/consumer.cc') (more/less context) (show whitespace changes)
-rw-r--r--lib/consumer.cc16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/consumer.cc b/lib/consumer.cc
index b215aa8..331b1e9 100644
--- a/lib/consumer.cc
+++ b/lib/consumer.cc
@@ -1,25 +1,16 @@
1#include <algorithm> 1#include <algorithm>
2#include <cassert>
2#include <opkele/util.h> 3#include <opkele/util.h>
3#include <opkele/exception.h> 4#include <opkele/exception.h>
4#include <opkele/data.h> 5#include <opkele/data.h>
5#include <opkele/consumer.h> 6#include <opkele/consumer.h>
6#include <openssl/sha.h> 7#include <openssl/sha.h>
7#include <openssl/hmac.h> 8#include <openssl/hmac.h>
8#include <mimetic/mimetic.h>
9#include <curl/curl.h> 9#include <curl/curl.h>
10#include <pcre++.h> 10#include <pcre++.h>
11 11
12#include <iostream> 12#include <iostream>
13 13
14/* silly mimetic */
15#undef PACKAGE
16#undef PACKAGE_BUGREPORT
17#undef PACKAGE_NAME
18#undef PACKAGE_STRING
19#undef PACKAGE_TARNAME
20#undef PACKAGE_VERSION
21#undef VERSION
22
23#include "config.h" 14#include "config.h"
24 15
25namespace opkele { 16namespace opkele {
@@ -166,11 +157,8 @@ namespace opkele {
166 try { 157 try {
167 assoc_t assoc = retrieve_assoc(server,pin.get_param("openid.assoc_handle")); 158 assoc_t assoc = retrieve_assoc(server,pin.get_param("openid.assoc_handle"));
168 const string& sigenc = pin.get_param("openid.sig"); 159 const string& sigenc = pin.get_param("openid.sig");
169 mimetic::Base64::Decoder b;
170 vector<unsigned char> sig; 160 vector<unsigned char> sig;
171 mimetic::decode( 161 util::decode_base64(sigenc,sig);
172 sigenc.begin(),sigenc.end(), b,
173 back_insert_iterator<vector<unsigned char> >(sig) );
174 const string& slist = pin.get_param("openid.signed"); 162 const string& slist = pin.get_param("openid.signed");
175 string kv; 163 string kv;
176 string::size_type p = 0; 164 string::size_type p = 0;