ensure that hmac is available (may result in a less useful psyced but better than nothing)

This commit is contained in:
psyc://psyced.org/~lynX 1984-04-04 00:44:07 +00:00
parent d97953ce47
commit d04fd7e105
4 changed files with 5 additions and 6 deletions

View File

@ -21,7 +21,9 @@ inherit NET_PATH "library/tls";
# ifdef SANDBOX # ifdef SANDBOX
inherit NET_PATH "library/sandbox"; inherit NET_PATH "library/sandbox";
# endif # endif
# if __EFUN_DEFINED__(hmac)
inherit NET_PATH "library/hmac"; inherit NET_PATH "library/hmac";
# endif
inherit NET_PATH "library/dns"; inherit NET_PATH "library/dns";
inherit NET_PATH "library/htbasics"; inherit NET_PATH "library/htbasics";
inherit NET_PATH "library/json"; inherit NET_PATH "library/json";

View File

@ -280,7 +280,7 @@
// still using rawp anywhere? // still using rawp anywhere?
//#define rawp(TEXT) { P1(("rawp? "+TEXT)) emit(TEXT); } //#define rawp(TEXT) { P1(("rawp? "+TEXT)) emit(TEXT); }
#ifdef _flag_enable_module_microblogging #if __EFUN_DEFINED__(hmac) && defined(_flag_enable_module_microblogging)
# if defined(TWITTER_KEY) && defined(TWITTER_SECRET) # if defined(TWITTER_KEY) && defined(TWITTER_SECRET)
# define TWITTER # define TWITTER
# endif # endif

View File

@ -924,9 +924,8 @@ case "_status_place_members":
// "_list_members_nicks" : t ]) ); // "_list_members_nicks" : t ]) );
// irc-thang: w(mc + "_end", 0, vars); // irc-thang: w(mc + "_end", 0, vars);
// return 1; // return 1;
#ifdef TELEPHONY_SECRET #if __EFUN_DEFINED__(hmac) && defined(TELEPHONY_SECRET)
# include <sys/tls.h> # include <sys/tls.h>
case "_notice_answer_call_click": case "_notice_answer_call_click":
case "_notice_answer_call": case "_notice_answer_call":
t = vars["_time_expire"]; t = vars["_time_expire"];
@ -943,9 +942,7 @@ case "_notice_answer_call":
t3 = NET_PATH "http/call"->make_session(MYNICK, to_int(t), t3); t3 = NET_PATH "http/call"->make_session(MYNICK, to_int(t), t3);
w("_notice_answer_call_link", 0, ([ w("_notice_answer_call_link", 0, ([
"_page_call": ( "_page_call": (
#ifdef __TLS__
(tls_available() && HTTPS_URL) || (tls_available() && HTTPS_URL) ||
#endif
HTTP_URL) + NET_PATH +"http/call?thats=me&sid=" +t3, HTTP_URL) + NET_PATH +"http/call?thats=me&sid=" +t3,
# ifdef TELEPHONY_SERVER # ifdef TELEPHONY_SERVER
"_uniform_call": TELEPHONY_SERVER + t2, "_uniform_call": TELEPHONY_SERVER + t2,

View File

@ -639,7 +639,7 @@ cmd(a, args, dest, command) {
"The PSYC authentication token \"[_nonce]\" is now valid. Use it wisely.", "The PSYC authentication token \"[_nonce]\" is now valid. Use it wisely.",
([ "_nonce" : v("nonce") ])); ([ "_nonce" : v("nonce") ]));
break; break;
#ifdef TELEPHONY_SECRET #if __EFUN_DEFINED__(hmac) && defined(TELEPHONY_SECRET)
# include <sys/tls.h> # include <sys/tls.h>
# ifndef TELEPHONY_EXPIRY # ifndef TELEPHONY_EXPIRY
# define TELEPHONY_EXPIRY (60*60) # define TELEPHONY_EXPIRY (60*60)