mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
upgrade gammas
This commit is contained in:
parent
ac39429f4a
commit
a602585399
20 changed files with 20 additions and 156 deletions
|
@ -246,7 +246,6 @@ int logon(int neverfails) {
|
|||
}
|
||||
|
||||
#ifdef __TLS__
|
||||
# ifdef GAMMA
|
||||
sAuthHosts(([ ])); // reset authhosts
|
||||
if (tls_available() && tls_query_connection_state(ME) == 1 && mappingp(cert = tls_certificate(ME, 0))) {
|
||||
if (cert[0] != 0) {
|
||||
|
@ -268,7 +267,7 @@ int logon(int neverfails) {
|
|||
else foreach(t : m) sAuthenticated(NAMEPREP(t));
|
||||
}
|
||||
//#ifdef _flag_allow_certificate_name_common // to be switched this year
|
||||
#ifndef _flag_disallow_certificate_name_common
|
||||
# ifndef _flag_disallow_certificate_name_common
|
||||
// assume that CN is a host
|
||||
// as this is an assumption only, we may NEVER register_target it
|
||||
// note: CN is deprecated for good reasons.
|
||||
|
@ -276,7 +275,7 @@ int logon(int neverfails) {
|
|||
P1(("%O believing CN %O\n", ME, t))
|
||||
sAuthenticated(NAMEPREP(t));
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
if (m = tls_query_connection_info(ME)) {
|
||||
P2(("%O is using the %O cipher.\n", ME, m[TLS_CIPHER]))
|
||||
// shouldn't our negotiation have ensured we have PFS?
|
||||
|
@ -292,7 +291,6 @@ int logon(int neverfails) {
|
|||
}
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
cvars = ([]);
|
||||
|
|
|
@ -131,7 +131,6 @@ varargs int rootMsg(mixed source, string mc, string data,
|
|||
}
|
||||
#endif
|
||||
break;
|
||||
#ifdef GAMMA
|
||||
case "_notice_authentication":
|
||||
P0(("rootMsg got a _notice_authentication. never happens since entity.c\n"))
|
||||
register_location(vars["_location"], source, 1);
|
||||
|
@ -139,7 +138,6 @@ varargs int rootMsg(mixed source, string mc, string data,
|
|||
case "_error_invalid_authentication":
|
||||
monitor_report(mc, psyctext("Breach: [_source] reports invalid authentication provided by [_location]", vars, data, source));
|
||||
break;
|
||||
#endif
|
||||
#if 0
|
||||
case "_request_session_compression":
|
||||
case "_request_session_compress":
|
||||
|
|
|
@ -170,15 +170,7 @@ private int conclude() {
|
|||
unless (lastvar) return 0;
|
||||
// if (abbrev("_INTERNAL", lastvar)) not necessary because
|
||||
// the following check only allows lowercase for now
|
||||
if (
|
||||
#ifdef GAMMA
|
||||
!legal_keyword(lastvar)
|
||||
#else
|
||||
// very relaxed strategy
|
||||
strlen(lastvar) < 2 || lastvar[0] != '_' // policy may change
|
||||
|| lastvar[1] > 'z' || lastvar[1] < 'a'
|
||||
#endif
|
||||
) {
|
||||
if ( !legal_keyword(lastvar) ) {
|
||||
croak("_error_illegal_protocol_variable",
|
||||
"You are not allowed to present a variable named [_variable_name].",
|
||||
([ "_variable_name": lastvar ]));
|
||||
|
@ -318,13 +310,11 @@ vamixed parse(string a) {
|
|||
}
|
||||
if (vname != "") {
|
||||
conclude();
|
||||
#ifdef GAMMA
|
||||
// intermediate hack in lack of real type support
|
||||
// which needs to be done in net/spyc
|
||||
if (abbrev("_time", vname)) vvalue = to_int(vvalue);
|
||||
// unused as yet: else if (abbrev("_date", vname))
|
||||
// vvalue = PSYC_EPOCH + to_int(vvalue);
|
||||
#endif
|
||||
cvars[lastvar = vname] = vvalue;
|
||||
#ifdef SYSTEM_SECRET
|
||||
unless (vcheck) {
|
||||
|
@ -461,17 +451,7 @@ vamixed parse(string a) {
|
|||
#ifdef BITKOENIG_SYNTAX
|
||||
sscanf(a, "%s %s", a, buffer);
|
||||
#endif
|
||||
#ifdef GAMMA
|
||||
if (!legal_keyword(a))
|
||||
#else
|
||||
// pretty inefficient strategy here
|
||||
for (i=strlen(a)-1; i>=0; i--)
|
||||
unless (a[i] == '_' ||
|
||||
(a[i] >= 'a' && a[i] <= 'z') ||
|
||||
(a[i] >= '0' && a[i] <= '9') ||
|
||||
(a[i] >= 'A' && a[i] <= 'Z'))
|
||||
#endif
|
||||
{
|
||||
if (!legal_keyword(a)) {
|
||||
croak("_error_illegal_method",
|
||||
"That's not a valid method name.");
|
||||
QUIT
|
||||
|
|
|
@ -70,7 +70,7 @@ parseUDP2(host, ip, port, msg) {
|
|||
}
|
||||
// else: we presume a UDP 4404 also listens on TCP
|
||||
|
||||
#ifndef GAMMA
|
||||
#if 0
|
||||
P1(("./psyc/udp.c: paranoid extra restart\n"))
|
||||
restart(); // leading . does that anyway
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue