summaryrefslogtreecommitdiffabout
path: root/lib/server.cc
Unidiff
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 b1c5c3a..aa61035 100644
--- a/lib/server.cc
+++ b/lib/server.cc
@@ -1,24 +1,25 @@
1#include <cstring>
1#include <vector> 2#include <vector>
2#include <openssl/sha.h> 3#include <openssl/sha.h>
3#include <openssl/hmac.h> 4#include <openssl/hmac.h>
4#include <opkele/util.h> 5#include <opkele/util.h>
5#include <opkele/exception.h> 6#include <opkele/exception.h>
6#include <opkele/server.h> 7#include <opkele/server.h>
7#include <opkele/data.h> 8#include <opkele/data.h>
8 9
9namespace opkele { 10namespace opkele {
10 using namespace std; 11 using namespace std;
11 12
12 void server_t::associate(const params_t& pin,params_t& pout) { 13 void server_t::associate(const params_t& pin,params_t& pout) {
13 util::dh_t dh; 14 util::dh_t dh;
14 util::bignum_t c_pub; 15 util::bignum_t c_pub;
15 unsigned char key_sha1[SHA_DIGEST_LENGTH]; 16 unsigned char key_sha1[SHA_DIGEST_LENGTH];
16 enum { 17 enum {
17 sess_cleartext, 18 sess_cleartext,
18 sess_dh_sha1 19 sess_dh_sha1
19 } st = sess_cleartext; 20 } st = sess_cleartext;
20 if( 21 if(
21 pin.has_param("openid.session_type") 22 pin.has_param("openid.session_type")
22 && pin.get_param("openid.session_type")=="DH-SHA1" ) { 23 && pin.get_param("openid.session_type")=="DH-SHA1" ) {
23 /* TODO: fallback to cleartext in case of exceptions here? */ 24 /* TODO: fallback to cleartext in case of exceptions here? */
24 if(!(dh = DH_new())) 25 if(!(dh = DH_new()))