author | Michael Krelin <hacker@klever.net> | 2007-11-21 14:01:36 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-11-21 14:01:36 (UTC) |
commit | 8e397698d6a224e36f2b4a188380ec04400aac66 (patch) (unidiff) | |
tree | da7aa7d75f6dd74b8d7260b7ab9c39241726ca88 | |
parent | 10916ef2b15b91badb17af5404acd9981b8a2087 (diff) | |
download | libopkele-8e397698d6a224e36f2b4a188380ec04400aac66.zip libopkele-8e397698d6a224e36f2b4a188380ec04400aac66.tar.gz libopkele-8e397698d6a224e36f2b4a188380ec04400aac66.tar.bz2 |
added some missing includes for gcc 4.3
According to Marcus Rueckert gcc 4.3 wants these. Thanks, Marcus!
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | lib/consumer.cc | 1 | ||||
-rw-r--r-- | lib/server.cc | 1 | ||||
-rw-r--r-- | lib/util.cc | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/consumer.cc b/lib/consumer.cc index f9212ea..d578546 100644 --- a/lib/consumer.cc +++ b/lib/consumer.cc | |||
@@ -1,26 +1,27 @@ | |||
1 | #include <algorithm> | 1 | #include <algorithm> |
2 | #include <cassert> | 2 | #include <cassert> |
3 | #include <cstring> | ||
3 | #include <opkele/util.h> | 4 | #include <opkele/util.h> |
4 | #include <opkele/exception.h> | 5 | #include <opkele/exception.h> |
5 | #include <opkele/data.h> | 6 | #include <opkele/data.h> |
6 | #include <opkele/consumer.h> | 7 | #include <opkele/consumer.h> |
7 | #include <openssl/sha.h> | 8 | #include <openssl/sha.h> |
8 | #include <openssl/hmac.h> | 9 | #include <openssl/hmac.h> |
9 | #include <curl/curl.h> | 10 | #include <curl/curl.h> |
10 | 11 | ||
11 | #include <iostream> | 12 | #include <iostream> |
12 | 13 | ||
13 | #include "config.h" | 14 | #include "config.h" |
14 | 15 | ||
15 | #include <pcre.h> | 16 | #include <pcre.h> |
16 | 17 | ||
17 | namespace opkele { | 18 | namespace opkele { |
18 | using namespace std; | 19 | using namespace std; |
19 | 20 | ||
20 | class pcre_matches_t { | 21 | class pcre_matches_t { |
21 | public: | 22 | public: |
22 | int *_ov; | 23 | int *_ov; |
23 | int _s; | 24 | int _s; |
24 | 25 | ||
25 | pcre_matches_t() : _ov(0), _s(0) { } | 26 | pcre_matches_t() : _ov(0), _s(0) { } |
26 | pcre_matches_t(int s) : _ov(0), _s(s) { | 27 | pcre_matches_t(int s) : _ov(0), _s(s) { |
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 | ||
9 | namespace opkele { | 10 | namespace 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())) |
diff --git a/lib/util.cc b/lib/util.cc index 94e09ed..26be66a 100644 --- a/lib/util.cc +++ b/lib/util.cc | |||
@@ -1,26 +1,27 @@ | |||
1 | #include <errno.h> | 1 | #include <errno.h> |
2 | #include <cassert> | 2 | #include <cassert> |
3 | #include <cstring> | ||
3 | #include <vector> | 4 | #include <vector> |
4 | #include <string> | 5 | #include <string> |
5 | #include <openssl/bio.h> | 6 | #include <openssl/bio.h> |
6 | #include <openssl/evp.h> | 7 | #include <openssl/evp.h> |
7 | #include <curl/curl.h> | 8 | #include <curl/curl.h> |
8 | #include "opkele/util.h" | 9 | #include "opkele/util.h" |
9 | #include "opkele/exception.h" | 10 | #include "opkele/exception.h" |
10 | 11 | ||
11 | namespace opkele { | 12 | namespace opkele { |
12 | using namespace std; | 13 | using namespace std; |
13 | 14 | ||
14 | namespace util { | 15 | namespace util { |
15 | 16 | ||
16 | /* | 17 | /* |
17 | * base64 | 18 | * base64 |
18 | */ | 19 | */ |
19 | string encode_base64(const void *data,size_t length) { | 20 | string encode_base64(const void *data,size_t length) { |
20 | BIO *b64 = 0, *bmem = 0; | 21 | BIO *b64 = 0, *bmem = 0; |
21 | try { | 22 | try { |
22 | b64 = BIO_new(BIO_f_base64()); | 23 | b64 = BIO_new(BIO_f_base64()); |
23 | if(!b64) | 24 | if(!b64) |
24 | throw exception_openssl(OPKELE_CP_ "failed to BIO_new() base64 encoder"); | 25 | throw exception_openssl(OPKELE_CP_ "failed to BIO_new() base64 encoder"); |
25 | BIO_set_flags(b64,BIO_FLAGS_BASE64_NO_NL); | 26 | BIO_set_flags(b64,BIO_FLAGS_BASE64_NO_NL); |
26 | bmem = BIO_new(BIO_s_mem()); | 27 | bmem = BIO_new(BIO_s_mem()); |