Additional comment changes for reformat of 1.0.2
[openssl.git] / engines / e_cswift.c
index 80d7894eba3db2d488ca0e9aab224396607e75b9..18c583d6893dc856f21815726d8522d2ea249d93 100644 (file)
@@ -141,7 +141,7 @@ static int cswift_mod_exp_dh(const DH *dh, BIGNUM *r,
 #endif
 
 /* RAND stuff */
-static int cswift_rand_bytes(unsigned char *buf, size_t num);
+static int cswift_rand_bytes(unsigned char *buf, int num);
 static int cswift_rand_status(void);
 
 /* The definitions for control commands specific to this engine */
@@ -811,7 +811,6 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa)
        SW_PARAM sw_param;
        SW_STATUS sw_status;
        SW_LARGENUMBER arg, res;
-       unsigned char *ptr;
        BN_CTX *ctx;
        BIGNUM *dsa_p = NULL;
        BIGNUM *dsa_q = NULL;
@@ -899,7 +898,6 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa)
                goto err;
                }
        /* Convert the response */
-       ptr = (unsigned char *)result->d;
        if((to_return = DSA_SIG_new()) == NULL)
                goto err;
        to_return->r = BN_bin2bn((unsigned char *)result->d, 20, NULL);
@@ -1040,7 +1038,7 @@ static int cswift_mod_exp_dh(const DH *dh, BIGNUM *r,
 #endif
 
 /* Random bytes are good */
-static int cswift_rand_bytes(unsigned char *buf, size_t num)
+static int cswift_rand_bytes(unsigned char *buf, int num)
 {
        SW_CONTEXT_HANDLE hac;
        SW_STATUS swrc;
@@ -1067,9 +1065,11 @@ static int cswift_rand_bytes(unsigned char *buf, size_t num)
        {
                largenum.value = buf;
                largenum.nbytes = sizeof(buf32);
-               /* tell CryptoSwift how many bytes we want and where we want it.
+               /*-
+                * tell CryptoSwift how many bytes we want and where we want it.
                 * Note: - CryptoSwift cannot do more than 4096 bytes at a time.
-                *       - CryptoSwift can only do multiple of 32-bits. */
+                *       - CryptoSwift can only do multiple of 32-bits.
+                */
                swrc = p_CSwift_SimpleRequest(hac, SW_CMD_RAND, NULL, 0, &largenum, 1);
                if (swrc != SW_OK)
                {