Use an OCTET STRING for the encoding of an OCSP nonce value.
[oweals/openssl.git] / engines / e_4758_cca.c
index 091e2dd3178e3035ddef41e453f9c42db20badd9..b006ed876373b933f0eb0c0ad056cf24773cc9f7 100644 (file)
@@ -76,7 +76,7 @@
 static int ibm_4758_cca_destroy(ENGINE *e);
 static int ibm_4758_cca_init(ENGINE *e);
 static int ibm_4758_cca_finish(ENGINE *e);
-static int ibm_4758_cca_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)());
+static int ibm_4758_cca_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void));
 
 /* rsa functions */
 /*---------------*/
@@ -182,7 +182,8 @@ static RSA_METHOD ibm_4758_cca_rsa =
        RSA_FLAG_SIGN_VER,        /* flags */
        NULL, /* app_data */
        cca_rsa_sign, /* rsa_sign */
-       cca_rsa_verify  /* rsa_verify */
+       cca_rsa_verify, /* rsa_verify */
+       NULL /* rsa_keygen */
        };
 #endif
 
@@ -342,7 +343,7 @@ static int ibm_4758_cca_finish(ENGINE *e)
        return 1;
        }
 
-static int ibm_4758_cca_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
+static int ibm_4758_cca_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void))
        {
        int initialised = ((dso == NULL) ? 0 : 1);
        switch(cmd)
@@ -389,7 +390,7 @@ static EVP_PKEY *ibm_4758_load_privkey(ENGINE* e, const char* key_id,
        unsigned char exitData[8];
        unsigned char ruleArray[8];
        unsigned char keyLabel[64];
-       long keyLabelLength = strlen(key_id);
+       unsigned long keyLabelLength = strlen(key_id);
        unsigned char modulus[256];
        long modulusFieldLength = sizeof(modulus);
        long modulusLength = 0;
@@ -481,7 +482,7 @@ static EVP_PKEY *ibm_4758_load_pubkey(ENGINE* e, const char* key_id,
        unsigned char exitData[8];
        unsigned char ruleArray[8];
        unsigned char keyLabel[64];
-       long keyLabelLength = strlen(key_id);
+       unsigned long keyLabelLength = strlen(key_id);
        unsigned char modulus[512];
        long modulusFieldLength = sizeof(modulus);
        long modulusLength = 0;
@@ -921,7 +922,7 @@ static int cca_get_random_bytes(unsigned char* buf, int num)
        unsigned char form[] = "RANDOM  ";
        unsigned char rand_buf[8];
 
-       while(num >= sizeof(rand_buf))
+       while(num >= (int)sizeof(rand_buf))
                {
                randomNumberGenerate(&ret_code, &reason_code, &exit_data_length,
                        exit_data, form, rand_buf);