- file upload handler: the FCGI version wasn't handling signatures,

because the code to read keys in FCGI was commented out
    (and was in fact wrong).
    I fixed it and uncommented it.
- make_project and upgrade: copy lib/crypt_prog to project/bin/

svn path=/trunk/boinc/; revision=14693
This commit is contained in:
David Anderson 2008-02-06 19:32:51 +00:00
parent be64fef081
commit 69cfcebef4
5 changed files with 27 additions and 12 deletions

View File

@ -1235,3 +1235,18 @@ Rom Feb 6 2008
clientgui/
BOINCTaskBar.cpp
David Feb 6 2008
- file upload handler: the FCGI version wasn't handling signatures,
because the code to read keys in FCGI was commented out
(and was in fact wrong).
I fixed it and uncommented it.
- make_project and upgrade: copy lib/crypt_prog to project/bin/
lib/
crypt.C
crypt_prog.C
py/Boinc/
setup_project.py
tools/
sign_executable.C

View File

@ -152,7 +152,6 @@ int scan_key_hex(FILE* f, KEY* key, int size) {
int num_bits;
#if _USING_FCGI_
#if 0
char *p, buf[256];
int j = 0, b;
fgets(buf, 256, f);
@ -161,18 +160,16 @@ int scan_key_hex(FILE* f, KEY* key, int size) {
len = size - sizeof(key->bits);
while (1) {
p = fgets(buf, 256, f);
if (!p) return ERR_GETS;
n = strlen(p)/2;
if (!p) break;
n = (strlen(p)-1)/2;
if (n == 0) break;
for (i=0; i<n; i++) {
sscanf(buf+i*2, "%2x", &b);
if (j >= len) return ERR_SCANF;
if (j == len) break;
key->data[j++] = b;
}
}
fgets(buf, size, f);
sscanf(buf, ".");
#endif
if (j != len) return ERR_NULL;
#else
fscanf(f, "%d", &num_bits);
key->bits = num_bits;

View File

@ -152,7 +152,7 @@ int main(int argc, char** argv) {
if (!fpub) die("fopen");
retval = scan_key_hex(fpub, (KEY*)&public_key, sizeof(public_key));
if (retval) die("read_public_key");
strcpy((char*)buf2, "foobar");
strcpy((char*)buf2, "encryption test successful");
in.data = buf2;
in.len = strlen((char*)in.data);
out.data = buf;

View File

@ -370,6 +370,8 @@ def install_boinc_files(dest_dir, web_only):
[ 'create_work', 'xadd', 'dbcheck_files_exist', 'run_in_ops',
'update_versions', 'parse_config', 'grep_logs', 'db_query',
'watch_tcp', 'sign_executable', 'dir_hier_move', 'dir_hier_path' ])
map(lambda (s): install(srcdir('lib',s), dir('bin',s)),
[ 'crypt_prog' ])
map(lambda (s): install(srcdir('sched',s), dir('',s)),
[ 'db_dump_spec.xml' ])

View File

@ -17,7 +17,7 @@
// or write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
// syntax: sign_executable <exectuable_path> <code_sign_file>
// syntax: sign_executable data_file private_key_file
#include "config.h"
#include "crypt.h"
@ -41,9 +41,10 @@ int sign_executable(char* path, char* code_sign_keyfile, char* signature_text) {
int main(int argc, char** argv) {
if (argc != 3) {
fprintf(stderr, "syntax: sign_executable <path> <code_sign_file>\n"
"\n"
"Outputs to stdout.\n");
fprintf(stderr, "syntax: sign_executable data_file private_key_file\n"
"\n"
"Writes signature to stdout.\n"
);
return 1;
}