Roxen.git/
server/
etc/
modules/
Roxen.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2007-01-03
2007-01-03 12:47:45 by Henrik Grubbström (Grubba) <grubba@grubba.org>
362428a30e740c6ed8b2628eaddbad8f01f5098f (
19
lines) (+
12
/-
7
)
[
Show
|
Annotate
]
Branch:
5.2
Cleaned up page.ssl-strength somewhat.
Rev: server/etc/modules/Roxen.pmod:1.224
1:
// This is a roxen pike module. Copyright © 1999 - 2004, Roxen IS. //
-
// $Id: Roxen.pmod,v 1.
223
2007/01/03 12:
31
:
35
wellhard
Exp $
+
// $Id: Roxen.pmod,v 1.
224
2007/01/03 12:
47
:
45
grubba
Exp $
#include <roxen.h> #include <config.h>
3689:
string _sprintf (int flag) { return flag == 'O' && "RXML.Scope(roxen)"; } }
+
int get_ssl_strength(string ignored, RequestID id)
+
{
+
if (!id->my_fd || !id->my_fd->SSLConnection ||
+
!id->my_fd->query_connection())
+
return 0;
+
return id->my_fd->query_connection()->session->cipher_spec->key_bits;
+
}
+
class ScopePage { inherit RXML.Scope; constant converter=(["fgcolor":"fgcolor", "bgcolor":"bgcolor",
3728:
c->misc[" _stat"][1]:-4, type); case "self": return ENCODE_RXML_TEXT( (c->id->not_query/"/")[-1], type); case "ssl-strength":
-
NOCACHE(
c->id
);
-
if (!c
->
id->my
_
fd || !c->id->my
_
fd->SSLConnection ||
-
!c->id->my_fd->query_connection
(
))
-
return ENCODE
_
RXML
_
INT(0, type
);
-
return ENCODE_RXML_INT(
c->id->my
_
fd->query
_
connection
(
)->
-
session
->
cipher_spec->key_bits
, type);
+
c->id->
register
_
vary
_
callback("Host",
get
_
ssl
_
strength
)
;
+
return ENCODE_RXML_INT(
get
_
ssl
_
strength
(
"",
c->id), type);
case "dir": array parts = c->id->not_query/"/"; return ENCODE_RXML_TEXT( parts[..sizeof(parts)-2]*"/"+"/", type);