On Saturday 08 July 2006 21:30, Rafael J. Wysocki wrote: > On Thursday 06 July 2006 21:33, Fabio Comolli wrote: > > On 7/5/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > > On Wednesday 05 July 2006 21:37, Fabio Comolli wrote: > > > > It says the image can not be read (or something like that, I did not > > > > write it down). > > > > > > Does it say "resume: Encrypted image" before asking for the passphrase? > > > > > > > No, it does not. Only "resume: compressed image". > > Well, I've tested it on i386 and reproduced the problem. It probably is > related to the sizes of data structures or something like that. > > Anyway, it seems that no one has ever tried to run it on i386 before you. ;-) > > Could you please replace all of the unsigned shorts in encrypt.h with > unsigned ints, recompile suspend, resume and suspend-keygen, > regenerate the key file and see what happens?
Sorry, I forgot that keygen.c should be modified to reflect the changes in encrypt.h. Appended is a patch that I'd like to test, but I have no i386 boxes close to me. Could you please? Rafael -- Index: suspend/keygen.c =================================================================== --- suspend.orig/keygen.c 2006-07-07 14:32:05.000000000 +0200 +++ suspend/keygen.c 2006-07-08 21:44:57.000000000 +0200 @@ -123,7 +123,7 @@ Retry: ret = EXIT_FAILURE; goto Free_RSA; } - size += 3 * sizeof(short) + KEY_TEST_SIZE; + size += sizeof(struct RSA_data) - RSA_DATA_SIZE; printf("File name [%s]: ", DEFAULT_FILE); fgets(in_buffer, MAX_STR_LEN, stdin); Index: suspend/encrypt.h =================================================================== --- suspend.orig/encrypt.h 2006-07-07 14:32:05.000000000 +0200 +++ suspend/encrypt.h 2006-07-08 21:49:10.000000000 +0200 @@ -23,9 +23,9 @@ #define KEY_TEST_DATA (unsigned char *)"12345678" struct RSA_data { - unsigned short n_size; - unsigned short e_size; - unsigned short d_size; + unsigned int n_size; + unsigned int e_size; + unsigned int d_size; unsigned char key_test[KEY_TEST_SIZE]; unsigned char data[RSA_DATA_SIZE]; }; @@ -37,7 +37,7 @@ struct key_data { }; struct encrypted_key { - unsigned short size; + unsigned int size; unsigned char data[KEY_DATA_SIZE]; }; ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel