summaryrefslogtreecommitdiffabout
path: root/lib/server.cc
authorMichael Krelin <hacker@klever.net>2008-02-16 17:49:22 (UTC)
committer Michael Krelin <hacker@klever.net>2008-02-16 17:49:22 (UTC)
commit21bddce2d98394865cf2ed0b144f92bbb6993bc9 (patch) (side-by-side diff)
treee30194fab08a704885ae00c711e1707dc73bed83 /lib/server.cc
parentccdfc6eacec435a59d773127762ad0b6bce07149 (diff)
downloadlibopkele-21bddce2d98394865cf2ed0b144f92bbb6993bc9.zip
libopkele-21bddce2d98394865cf2ed0b144f92bbb6993bc9.tar.gz
libopkele-21bddce2d98394865cf2ed0b144f92bbb6993bc9.tar.bz2
moved some stuff out of the now installed util.h header
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'lib/server.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/server.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/server.cc b/lib/server.cc
index 776f1ae..0dea1eb 100644
--- a/lib/server.cc
+++ b/lib/server.cc
@@ -1,29 +1,30 @@
#include <cstring>
#include <vector>
#include <openssl/sha.h>
#include <openssl/hmac.h>
#include <opkele/util.h>
+#include <opkele/util-internal.h>
#include <opkele/exception.h>
#include <opkele/server.h>
#include <opkele/data.h>
namespace opkele {
using namespace std;
void server_t::associate(const params_t& pin,params_t& pout) {
util::dh_t dh;
util::bignum_t c_pub;
unsigned char key_sha1[SHA_DIGEST_LENGTH];
enum {
sess_cleartext,
sess_dh_sha1
} st = sess_cleartext;
if(
pin.has_param("openid.session_type")
&& pin.get_param("openid.session_type")=="DH-SHA1" ) {
/* TODO: fallback to cleartext in case of exceptions here? */
if(!(dh = DH_new()))
throw exception_openssl(OPKELE_CP_ "failed to DH_new()");
c_pub = util::base64_to_bignum(pin.get_param("openid.dh_consumer_public"));
if(pin.has_param("openid.dh_modulus"))
dh->p = util::base64_to_bignum(pin.get_param("openid.dh_modulus"));