again changing // to /* */ so that sun's compiler doesn't fail.
authorKent Mein <mein@cs.umn.edu>
Wed, 30 Oct 2002 21:51:56 +0000 (21:51 +0000)
committerKent Mein <mein@cs.umn.edu>
Wed, 30 Oct 2002 21:51:56 +0000 (21:51 +0000)
(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
source/blender/verify/BLO_signer_info.h
source/blender/verify/intern/BLO_verify.c

index 0d2ddc2e7e7be62d9d10a5de4160ae550ba54355..8f26eed95aa9d73346796424e1725e2c4acb431a 100644 (file)
@@ -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
index 6a7cab0930e9d872e7f7ca120d5e220c27528aef..d2e6b987147e1354de871748a0880135c7238a70 100644 (file)
@@ -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);
index f9c71be1432ee54b21988c735cb367d3d35b49b3..7e08b2be0e8f10768989ca2f9221fd6cf3473a4e 100644 (file)
@@ -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);