-rw-r--r-- | lib/consumer.cc | 16 |
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 | ||
25 | namespace opkele { | 16 | namespace 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; |