]> wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - benchmark/sign.c
CI: cirrus: bump image to freebsd 13.1
[openssl-gost/engine.git] / benchmark / sign.c
index 5c53df79abb24e1ad9fa565d841269896385065f..d9b08bb725890a35d4ac1aa2d879177eecc3c905 100644 (file)
@@ -40,27 +40,24 @@ static EVP_PKEY *create_key(const char *algname, const char *param)
        EVP_PKEY *key1 = EVP_PKEY_new(), *newkey = NULL;
        EVP_PKEY_CTX *ctx = NULL;
 
-       if(EVP_PKEY_set_type_str(key1, algname, strlen(algname)) <= 0)
-       {
-               goto err;
-       }
-       if(!(ctx = EVP_PKEY_CTX_new(key1, NULL)))
-       {
-               goto err;
-       }
-       EVP_PKEY_keygen_init(ctx);
-       if(ERR_peek_last_error())
-       {
-               goto err;
-       }
-       if(EVP_PKEY_CTX_ctrl_str(ctx, "paramset", param) <= 0)
-       {
-               goto err;
-       }
-       if(EVP_PKEY_keygen(ctx, &newkey) <= 0)
-       {
-               goto err;
-       }
+       if (EVP_PKEY_set_type_str(key1, algname, strlen(algname)) <= 0)
+                 goto err;
+
+       if (!(ctx = EVP_PKEY_CTX_new(key1, NULL)))
+                 goto err;
+
+       if (EVP_PKEY_keygen_init(ctx) == 0)
+                 goto err;
+
+       if (ERR_peek_last_error())
+                 goto err;
+
+       if (EVP_PKEY_CTX_ctrl_str(ctx, "paramset", param) <= 0)
+                 goto err;
+
+       if (EVP_PKEY_keygen(ctx, &newkey) <= 0)
+                 goto err;
+
 err:
        if(ctx)
                EVP_PKEY_CTX_free(ctx);
@@ -85,8 +82,6 @@ int main(int argc, char **argv)
        opterr = 0;
        while((option = getopt(argc, argv, "l:c:C")) >= 0)
        {
-               if(option == ':') option = optopt;
-               if(optarg && (optarg[0] == '-')) { optind--; optarg = NULL; }
                switch (option)
                {
                        case 'l':