fix a few more style issues
authorDr. Stephen Henson <steve@openssl.org>
Sat, 7 Jan 2017 17:17:30 +0000 (17:17 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 8 Jan 2017 01:42:52 +0000 (01:42 +0000)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2177)

crypto/evp/pmeth_lib.c
crypto/rsa/rsa_ameth.c
crypto/rsa/rsa_pmeth.c

index 4ea36b7addbbd8a71b1c68270732488fffc4c581..e7845ed43b6bf7a43d72a3f04c9d75fbc97ea45f 100644 (file)
@@ -367,6 +367,7 @@ int EVP_PKEY_CTX_hex2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *hex)
 int EVP_PKEY_CTX_md(EVP_PKEY_CTX *ctx, int optype, int cmd, const char *md)
 {
     const EVP_MD *m;
+
     if (md == NULL || (m = EVP_get_digestbyname(md)) == NULL) {
         EVPerr(EVP_F_EVP_PKEY_CTX_MD, EVP_R_INVALID_DIGEST);
         return 0;
index 26033286e7119c138fa37dd2c0a9700e41102399..ae844eaf1f3238995afbda6de9a8aceaa109e03e 100644 (file)
@@ -397,6 +397,7 @@ static int rsa_sig_print(BIO *bp, const X509_ALGOR *sigalg,
     if (OBJ_obj2nid(sigalg->algorithm) == EVP_PKEY_RSA_PSS) {
         int rv;
         RSA_PSS_PARAMS *pss = rsa_pss_decode(sigalg);
+
         rv = rsa_pss_param_print(bp, 0, pss, indent);
         RSA_PSS_PARAMS_free(pss);
         if (!rv)
@@ -659,8 +660,9 @@ int rsa_pss_get_param(const RSA_PSS_PARAMS *pss, const EVP_MD **pmd,
             RSAerr(RSA_F_RSA_PSS_GET_PARAM, RSA_R_INVALID_SALT_LENGTH);
             return 0;
         }
-    } else
+    } else {
         *psaltlen = 20;
+    }
 
     /*
      * low-level routines support only trailer field 0xbc (value 1) and
index 3e8f92c706173f75cd3dd4bb1cc24cf9d1b802f7..d55fb21c40ecc92aa10cc1c3fcd1f37b52d1f2e3 100644 (file)
@@ -626,8 +626,8 @@ static int pkey_rsa_ctrl_str(EVP_PKEY_CTX *ctx,
                                    EVP_PKEY_CTRL_MD, value);
 
         if (strcmp(type, "rsa_pss_keygen_saltlen") == 0) {
-            int saltlen;
-            saltlen = atoi(value);
+            int saltlen = atoi(value);
+
             return EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, saltlen);
         }
     }