author | Michael Krelin <hacker@klever.net> | 2007-01-12 12:58:25 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-01-12 12:58:25 (UTC) |
commit | e79687a3d9a1631613de02d8e12bae36302b46ab (patch) (side-by-side diff) | |
tree | 4238c0d8d61f5e70ed1e98debb01315babb21686 /lib/server.cc | |
parent | 4cc2e58186e8cd9b96a3573c92f6664064cf11fe (diff) | |
download | libopkele-e79687a3d9a1631613de02d8e12bae36302b46ab.zip libopkele-e79687a3d9a1631613de02d8e12bae36302b46ab.tar.gz libopkele-e79687a3d9a1631613de02d8e12bae36302b46ab.tar.bz2 |
eliminated mimetic dependency and made use of openssl base64 encoder instead
-rw-r--r-- | lib/server.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/server.cc b/lib/server.cc index 8c29abb..e81d4b6 100644 --- a/lib/server.cc +++ b/lib/server.cc @@ -1,12 +1,11 @@ #include <vector> #include <openssl/sha.h> #include <openssl/hmac.h> -#include <mimetic/mimetic.h> #include <opkele/util.h> #include <opkele/exception.h> #include <opkele/server.h> #include <opkele/data.h> namespace opkele { using namespace std; @@ -108,21 +107,18 @@ namespace opkele { pout["exipres_in"] = "120"; pout["signed"]="mode,identity,return_to"; if(ext) ext->checkid_hook(pin,pout); pout.sign(assoc->secret(),pout["sig"],pout["signed"]); } void server_t::check_authentication(const params_t& pin,params_t& pout) { vector<unsigned char> sig; - mimetic::Base64::Decoder b; const string& sigenc = pin.get_param("openid.sig"); - mimetic::decode( - sigenc.begin(),sigenc.end(), b, - back_insert_iterator<vector<unsigned char> >(sig)); + util::decode_base64(sigenc,sig); assoc_t assoc; try { assoc = retrieve_assoc(pin.get_param("openid.assoc_handle")); }catch(failed_lookup& fl) { throw failed_assertion(OPKELE_CP_ "invalid handle or handle not specified"); } if(!assoc->stateless()) throw stateful_handle(OPKELE_CP_ "will not do check_authentication on a stateful handle"); |