author | Michael Krelin <hacker@klever.net> | 2008-11-12 20:07:32 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-11-12 20:07:32 (UTC) |
commit | 54f0c8a8f1a85669e623f04a209928daee5c59cc (patch) (side-by-side diff) | |
tree | 9e6cde38964ef70b9130d46349e0aa97dc0acb60 /lib | |
parent | 4522de61114018633f66492e2e9977cdb3108098 (diff) | |
download | libopkele-54f0c8a8f1a85669e623f04a209928daee5c59cc.zip libopkele-54f0c8a8f1a85669e623f04a209928daee5c59cc.tar.gz libopkele-54f0c8a8f1a85669e623f04a209928daee5c59cc.tar.bz2 |
build fix: added missing include
Thanks to Jim Downing for spotting it!
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | lib/basic_rp.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/basic_rp.cc b/lib/basic_rp.cc index 3357d0b..3cad71c 100644 --- a/lib/basic_rp.cc +++ b/lib/basic_rp.cc @@ -1,48 +1,49 @@ +#include <sys/types.h> #include <cassert> #include <openssl/sha.h> #include <openssl/hmac.h> #include <opkele/basic_rp.h> #include <opkele/exception.h> #include <opkele/uris.h> #include <opkele/data.h> #include <opkele/util.h> #include <opkele/util-internal.h> #include <opkele/curl.h> #include <opkele/debug.h> namespace opkele { void basic_RP::reset_vars() { claimed_id.clear(); identity.clear(); } const string& basic_RP::get_claimed_id() const { if(claimed_id.empty()) throw non_identity(OPKELE_CP_ "attempting to retreive claimed_id of non-identity assertion"); assert(!identity.empty()); return claimed_id; } const string& basic_RP::get_identity() const { if(identity.empty()) throw non_identity(OPKELE_CP_ "attempting to retrieve identity of non-identity related assertion"); assert(!claimed_id.empty()); return identity; } static void dh_get_secret( secret_t& secret, const basic_openid_message& om, const char *exp_assoc, const char *exp_sess, util::dh_t& dh, size_t d_len, unsigned char *(*d_fun)(const unsigned char*,size_t,unsigned char*), size_t exp_s_len) try { if(om.get_field("assoc_type")!=exp_assoc || om.get_field("session_type")!=exp_sess) throw bad_input(OPKELE_CP_ "Unexpected associate response"); util::bignum_t s_pub = util::base64_to_bignum(om.get_field("dh_server_public")); vector<unsigned char> ck(DH_size(dh)+1); unsigned char *ckptr = &(ck.front())+1; int cklen = DH_compute_key(ckptr,s_pub,dh); if(cklen<0) throw exception_openssl(OPKELE_CP_ "failed to DH_compute_key()"); if(cklen && (*ckptr)&0x80) { (*(--ckptr))=0; ++cklen; } |