doc: link images removed
doc: stylesheet improved encoding changed from utf-8 to utf-16master
parent
989a64d3d7
commit
7dcc84c75b
@ -0,0 +1,68 @@
|
||||
|
||||
<a id="top"></a>
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-eaec6be4efea7b38c41712778bfd4fb8d2827d3c">Overview</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-51173f0423ca91d36cd0cfcdc75a06d90cc087ee">Locations</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-9b9b6463081c4d9d13e3aadebe9daaf61fa67b5c">Examples</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
<p> </p>
|
||||
<hr>
|
||||
<p> </p>
|
||||
<p><em>back to <a href="/cryptobox?action=doc&page=CryptoBoxDev">CryptoBoxDev</a></em> </p>
|
||||
|
||||
<h2 id="head-eaec6be4efea7b38c41712778bfd4fb8d2827d3c">Overview</h2>
|
||||
|
||||
<p>You may change nearly every aspect of the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> by using the custom configuration hook directory. </p>
|
||||
<p>Any script inside of this directory will be executed after the default configuration procedure (see <a href="/cryptobox?action=doc&page=CryptoBoxDevWorkFlow">CryptoBoxDevWorkFlow</a>). </p>
|
||||
<p>The order of execution is defined by the names of the scripts (alphabetically). </p>
|
||||
|
||||
<h2 id="head-51173f0423ca91d36cd0cfcdc75a06d90cc087ee">Locations</h2>
|
||||
|
||||
<p>Some example customization scripts can be found in <em>configure-examples.d/</em>. </p>
|
||||
<p>You may put your scripts into <em>configure-local.d/</em>. They will be sourced by <em>cbox-build.sh</em>. </p>
|
||||
|
||||
<h2 id="head-9b9b6463081c4d9d13e3aadebe9daaf61fa67b5c">Examples</h2>
|
||||
|
||||
<p>The examples in <em>configure-examples.d/</em> can be copied to <em>configure-local.d/</em> and adjusted to your needs. </p>
|
||||
<dl>
|
||||
<dt>set_default_ip</dt>
|
||||
<dd><p>change the default IP address of the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> </p>
|
||||
</dd>
|
||||
<dt>set_default_language</dt>
|
||||
<dd><p>set the default language </p>
|
||||
</dd>
|
||||
<dt>set_default_timeout</dt>
|
||||
<dd><p>set the default idle time for automatic unmounting </p>
|
||||
</dd>
|
||||
<dt>set_hostname</dt>
|
||||
<dd><p>change the default hostname </p>
|
||||
</dd>
|
||||
<dt>set_root_pw</dt>
|
||||
<dd><p>change the password of root (only useful for a development <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a>) </p>
|
||||
</dd>
|
||||
<dt>import_authorized_keys</dt>
|
||||
<dd><p>upload a <em>ssh</em> key for passwordless access to a development <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> </p>
|
||||
</dd>
|
||||
<dt>set_scan_devices</dt>
|
||||
<dd><p>where to look for usable harddisks </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<a id="bottom"></a>
|
||||
|
||||
</div>
|
||||
<p id="pageinfo" class="info" lang="en" dir="ltr">last edited 2005-09-05 20:16:37 by <span title="">lars</span></p>
|
||||
|
||||
</div> <!-- end page -->
|
||||
|
||||
|
||||
|
@ -0,0 +1,61 @@
|
||||
|
||||
<a id="top"></a>
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<a href="#head-5e20146fd39363329427c6251209cccb8d374f3e">Overview</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-6e1d416048c4d8ebfb5b3919b4d924c77e652a7b">Validate</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#head-5634566bd24f83d397b43525fc62685f6e678fbf">How to create a test</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
<p> </p>
|
||||
<hr>
|
||||
<p> </p>
|
||||
|
||||
<h2 id="head-5e20146fd39363329427c6251209cccb8d374f3e">Overview</h2>
|
||||
|
||||
<p>The validation feature allows to check the programming logic of the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a>. A lot of test cases are defined to test as many functions of the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> as possible. </p>
|
||||
<p>The requests are processed with <a class="external" href="http://curl.haxx.se/">curl</a>. </p>
|
||||
<p>The received web page is saved to allow a later design review or css debugging. </p>
|
||||
<p>The current state of the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> is represented by ten single values (e.g.: <em>box is configured</em>, <em>IP of the box</em>, <em>current language setting</em>, ...), which are invisibly a part of each html page (as comments). The returned status of every request is compared to the predicted value of the test case. </p>
|
||||
<p>Similar test cases are pooled into test groups (e.g.: <em>initialization</em>, <em>configuration</em> and <em>mounting</em>). </p>
|
||||
|
||||
<h2 id="head-6e1d416048c4d8ebfb5b3919b4d924c77e652a7b">Validate</h2>
|
||||
|
||||
<p>Run <tt>tools/validate.sh check_all</tt> to conduct all tests of all groups. See <tt>tools/validate.sh help</tt> for other actions. </p>
|
||||
<p>The results will be saved at <em>validation/report</em>. </p>
|
||||
<p>In addition to every single retrieved page, a html page called <em>summary.html</em> is created, which contains the state checks of all tests in a group. </p>
|
||||
|
||||
<h2 id="head-5634566bd24f83d397b43525fc62685f6e678fbf">How to create a test</h2>
|
||||
|
||||
<p>All test cases can be found in <em>validation/test-cases</em>. </p>
|
||||
<p>Every test consists of: </p>
|
||||
<dl>
|
||||
<dt>input.curl</dt>
|
||||
<dd><p>the configuration file for the <em>curl</em> request </p>
|
||||
</dd>
|
||||
<dt>output</dt>
|
||||
<dd><p>the predicted state of the <a href="/cryptobox?action=doc&page=CryptoBox">CryptoBox</a> after the call </p>
|
||||
</dd>
|
||||
<dt>description</dt>
|
||||
<dd><p>a short description of the test (will be used for the summary) </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Use the existing test cases as a template for new tests. </p>
|
||||
<p>Any logical branch of the web interface CGI should be validated by a test case. </p>
|
||||
<a id="bottom"></a>
|
||||
|
||||
</div>
|
||||
<p id="pageinfo" class="info" lang="en" dir="ltr">last edited 2005-09-05 19:48:55 by <span title="">lars</span></p>
|
||||
|
||||
</div> <!-- end page -->
|
||||
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 214 B |
Binary file not shown.
Before Width: | Height: | Size: 150 B |
@ -1,139 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
# parse config file
|
||||
. /etc/cryptobox/cryptobox.conf
|
||||
|
||||
|
||||
function get_cgi_param()
|
||||
# parse the query string for a parameter
|
||||
{
|
||||
# thttpd does not set query string if it is empty
|
||||
set | grep -q "^QUERY_STRING=" || return 0
|
||||
# filter the value
|
||||
echo "$QUERY_STRING" | sed 's/&/\n/g' | grep "^$1=" | cut -d '=' -f 2-
|
||||
}
|
||||
|
||||
|
||||
function header()
|
||||
{
|
||||
echo "Content-Type: text/html"
|
||||
echo
|
||||
echo '<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CryptoBox</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
</head>
|
||||
<body>'
|
||||
|
||||
echo "<p align=\"right\"><a href=\"$SCRIPT_NAME\">Main page</a></p>"
|
||||
|
||||
# nav bar
|
||||
echo '<div id="groups_generate">'
|
||||
list_groups4generate
|
||||
echo '</div>'
|
||||
echo '<div id="groups_display">'
|
||||
list_groups4display
|
||||
echo '</div>'
|
||||
|
||||
echo '<p><hr/></p>'
|
||||
|
||||
if [ -n "$GROUP" ]
|
||||
then echo '<div id="cases" style="float:left">'
|
||||
list_cases "$GROUP"
|
||||
echo '</div>'
|
||||
fi
|
||||
|
||||
echo '<div id="content">'
|
||||
}
|
||||
|
||||
|
||||
function footer()
|
||||
{
|
||||
echo '</div>'
|
||||
echo '</body></html>'
|
||||
}
|
||||
|
||||
|
||||
function list_groups4generate()
|
||||
{
|
||||
echo '<p><b>Generate report: </b>'
|
||||
local list=$($VALIDATE_SCRIPT list)
|
||||
if [ -z "$list" ]
|
||||
then echo 'none'
|
||||
else for a in $list
|
||||
do echo "<a href=\"${SCRIPT_NAME}?action=generate&group=$a\">$a</a> "
|
||||
done
|
||||
fi
|
||||
echo '</p>'
|
||||
}
|
||||
|
||||
|
||||
function list_groups4display()
|
||||
{
|
||||
echo '<p><b>View generated report: </b>'
|
||||
local list=$(find "$REPORT_DIR" -type d -mindepth 1 -maxdepth 1 | sort | while read a
|
||||
do echo $(basename "$a"); done)
|
||||
if [ -z "$list" ]
|
||||
then echo 'none available'
|
||||
else for a in $list
|
||||
do echo "<a href=\"${SCRIPT_NAME}?action=display&group=$a\">$a</a> "
|
||||
done
|
||||
fi
|
||||
echo '</p>'
|
||||
}
|
||||
|
||||
|
||||
function list_cases()
|
||||
# parameter: group
|
||||
{
|
||||
echo '<p>'
|
||||
if [ -d "$REPORT_DIR/$1" ]
|
||||
then find "$REPORT_DIR/$1" -type f -name \*.html | while read a; do basename "${a%.html}"; done | sort | while read a
|
||||
do echo "<a href=\"/report/$1/${a}.html\">$a</a><br/>"
|
||||
done
|
||||
fi
|
||||
echo '</p>'
|
||||
}
|
||||
|
||||
|
||||
function display_case()
|
||||
# parameter: group case
|
||||
{
|
||||
local FILE="$REPORT_DIR/$1/${2}.html"
|
||||
if [ -e "$FILE" ]
|
||||
then cat "$FILE" | sed '1,/<body/d; /<\/body>/,$d'
|
||||
else echo "<p align=\"center\">File ($FILE) not found!</p>"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
########### main ##############
|
||||
|
||||
ACTION=$(get_cgi_param action)
|
||||
GROUP=$(get_cgi_param group)
|
||||
CASE=$(get_cgi_param case)
|
||||
|
||||
header
|
||||
|
||||
if [ ! -e "$DEV_FEATURES_SCRIPT" ]
|
||||
then echo '<p align="center">This action is only availbale for a development CryptoBox-CD.</p>'
|
||||
elif [ "$ACTION" = "generate" -a -n "$GROUP" ]
|
||||
then $VALIDATE_SCRIPT check "$GROUP" </dev/null &>/dev/null &
|
||||
echo '<p align="center">Validation will take some minutes ...</p>'
|
||||
elif [ "$ACTION" = "display" ]
|
||||
then if [ -n "$GROUP" -a -n "$CASE" ]
|
||||
then display_case "$GROUP" "$CASE"
|
||||
elif [ -n "$GROUP" ]
|
||||
then display_case "$GROUP" "summary"
|
||||
fi
|
||||
else [ -n "$ACTION" ] && echo "<p align=\"center\">Unknown action ($ACTION)!</p>"
|
||||
fi
|
||||
|
||||
footer
|
Loading…
Reference in New Issue