From 0bca79288003053c8c55e00b13e8e910d390eb47 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Wed, 30 Oct 2002 21:51:56 +0000 Subject: again changing // to /* */ so that sun's compiler doesn't fail. (note these are all in source/blender/verify) Sorry about not putting the full path in on the last two, I just noticed it doesn't do that unless your in the root dir. mein@cs.umn.edu --- source/blender/verify/BLO_sign_verify_Header.h | 19 ++++++++--------- source/blender/verify/BLO_signer_info.h | 2 +- source/blender/verify/intern/BLO_verify.c | 28 +++++++++++++------------- 3 files changed, 25 insertions(+), 24 deletions(-) (limited to 'source/blender/verify') diff --git a/source/blender/verify/BLO_sign_verify_Header.h b/source/blender/verify/BLO_sign_verify_Header.h index 0d2ddc2e7e7..8f26eed95aa 100644 --- a/source/blender/verify/BLO_sign_verify_Header.h +++ b/source/blender/verify/BLO_sign_verify_Header.h @@ -41,9 +41,10 @@ extern "C" { #include "BLO_sys_types.h" #define SIGNVERIFYHEADERSTRUCTSIZE sizeof(struct BLO_sign_verify_HeaderStruct) -// TODO use reasonable sizes -// Tests showed: pubKeyLen 64, cryptedKeyLen 64 bytes -// So we pick 2*64 bytes + tail for now : +/* TODO use reasonable sizes +Tests showed: pubKeyLen 64, cryptedKeyLen 64 bytes +So we pick 2*64 bytes + tail for now : */ + #define MAXPUBKEYLEN 130 #define MAXSIGNATURELEN 130 @@ -62,12 +63,12 @@ struct BLO_sign_verify_HeaderStruct { #define MAXSIGNERLEN 100 struct BLO_SignerHeaderStruct { - uint8_t name[MAXSIGNERLEN]; // the signers name (from the key) - uint8_t email[MAXSIGNERLEN]; // the signers email (from the key) - uint8_t homeUrl[MAXSIGNERLEN]; // the signers home page - uint8_t text[MAXSIGNERLEN]; // optional additional user text - uint8_t pubKeyUrl1[MAXSIGNERLEN]; // the signers pubKey store - uint8_t pubKeyUrl2[MAXSIGNERLEN]; // the signers pubKey at NaN + uint8_t name[MAXSIGNERLEN]; /* the signers name (from the key) */ + uint8_t email[MAXSIGNERLEN]; /* the signers email (from the key) */ + uint8_t homeUrl[MAXSIGNERLEN]; /* the signers home page */ + uint8_t text[MAXSIGNERLEN]; /* optional additional user text */ + uint8_t pubKeyUrl1[MAXSIGNERLEN]; /* the signers pubKey store */ + uint8_t pubKeyUrl2[MAXSIGNERLEN]; /* the signers pubKey at NaN */ }; #ifdef __cplusplus diff --git a/source/blender/verify/BLO_signer_info.h b/source/blender/verify/BLO_signer_info.h index 6a7cab0930e..d2e6b987147 100644 --- a/source/blender/verify/BLO_signer_info.h +++ b/source/blender/verify/BLO_signer_info.h @@ -39,7 +39,7 @@ struct BLO_SignerInfo { char name[MAXSIGNERLEN]; char email[MAXSIGNERLEN]; char homeUrl[MAXSIGNERLEN]; - // more to come... + /* more to come... */ }; struct BLO_SignerInfo *BLO_getSignerInfo(void); diff --git a/source/blender/verify/intern/BLO_verify.c b/source/blender/verify/intern/BLO_verify.c index f9c71be1432..7e08b2be0e8 100644 --- a/source/blender/verify/intern/BLO_verify.c +++ b/source/blender/verify/intern/BLO_verify.c @@ -46,7 +46,7 @@ #include "BLO_verify.h" #include "BLO_sign_verify_Header.h" /* used by verify and encrypt */ -#include "BLO_signer_info.h" // external signer info struct +#include "BLO_signer_info.h" /* external signer info struct */ static struct BLO_SignerInfo g_SignerInfo = {"", "", ""}; @@ -202,9 +202,9 @@ BLO_verify_process( /* Is there really (still) new data available ? */ if (dataIn > 0) { - // BLO_SignerHeaderStruct + /* BLO_SignerHeaderStruct */ if (BLO_verify->signerHeader->name[0] == 0) { - // we don't have our signerHeader complete yet + /* we don't have our signerHeader complete yet */ unsigned int processed; processed = ((dataIn + BLO_verify->streamDone - SIGNVERIFYHEADERSTRUCTSIZE) <= SIGNERHEADERSTRUCTSIZE) @@ -217,7 +217,7 @@ BLO_verify_process( data += processed; if (BLO_verify->streamDone == SIGNVERIFYHEADERSTRUCTSIZE + SIGNERHEADERSTRUCTSIZE) { - // we have the whole header, absorb it + /* we have the whole header, absorb it */ struct BLO_SignerHeaderStruct *signerHeader; signerHeader = (struct BLO_SignerHeaderStruct *) BLO_verify->signerHeaderBuffer; @@ -246,12 +246,12 @@ BLO_verify_process( BLO_verify->signerHeader->pubKeyUrl1, BLO_verify->signerHeader->pubKeyUrl2); #endif - // also update the signature and crc checksum + /* also update the signature and crc checksum */ RIPEMD160_Update(&(BLO_verify->ripemd160_ctx), BLO_verify->signerHeaderBuffer, SIGNERHEADERSTRUCTSIZE); - // update datacrc + /* update datacrc */ BLO_verify->datacrc = crc32( BLO_verify->datacrc, (const Bytef *) BLO_verify->signerHeaderBuffer, @@ -264,13 +264,13 @@ BLO_verify_process( if (dataIn > 0) { RIPEMD160_Update(&(BLO_verify->ripemd160_ctx), data, dataIn); - // update datacrc + /* update datacrc */ BLO_verify->datacrc = crc32( BLO_verify->datacrc, (const Bytef *) data, dataIn); BLO_verify->streamDone += dataIn; - // give data to streamGlueRead, it will find out what to do next + /* give data to streamGlueRead, it will find out what to do next */ err = readStreamGlue( BLO_verify->endControl, &(BLO_verify->streamGlue), @@ -365,16 +365,16 @@ BLO_verify_end( free(BLO_verify); return err; } - // static exponent + /* static exponent */ rsa->e = BN_bin2bn(rsa_e, sizeof(rsa_e)-1, rsa->e); - // public part into rsa->n + /* public part into rsa->n */ rsa->n = BN_bin2bn(BLO_verify->streamHeader->pubKey, BLO_verify->streamHeader->pubKeyLen, rsa->n); - //DEBUG RSA_print_fp(stdout, rsa, 0); + /*DEBUG RSA_print_fp(stdout, rsa, 0); */ - // verify the signature + /* verify the signature */ verifySuccess = RSA_verify(NID_ripemd160, digest, RIPEMD160_DIGEST_LENGTH, BLO_verify->streamHeader->signature, BLO_verify->streamHeader->signatureLen, rsa); @@ -392,12 +392,12 @@ BLO_verify_end( BRS_SETSPECERR(BRS_SIGFAILED); } -// copy signer information to external struct +/* copy signer information to external struct */ strncpy(g_SignerInfo.name, BLO_verify->signerHeader->name, MAXSIGNERLEN-1); strncpy(g_SignerInfo.email, BLO_verify->signerHeader->email, MAXSIGNERLEN-1); strncpy(g_SignerInfo.homeUrl, BLO_verify->signerHeader->homeUrl, MAXSIGNERLEN-1); -// + free(digest); free(BLO_verify->streamGlue); free(BLO_verify->streamHeader); -- cgit v1.2.3