]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dcrypt: Use len instead of ln
authorAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 23 Aug 2019 10:46:33 +0000 (13:46 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 23 Sep 2019 05:47:45 +0000 (08:47 +0300)
src/lib-dcrypt/dcrypt-openssl.c

index c2dbd301e544be2ab8fb57c401c9a423400f12f1..5d8877f4c7130c2c586f9d597f4c2e93372811c9 100644 (file)
@@ -1656,10 +1656,10 @@ dcrypt_openssl_store_private_key_dovecot(struct dcrypt_private_key *key,
        }
 
        int enctype = DCRYPT_KEY_ENCRYPTION_TYPE_NONE;
-       int ln = OBJ_obj2txt(objtxt, sizeof(objtxt), obj, 1);
-       if (ln < 1)
+       int len = OBJ_obj2txt(objtxt, sizeof(objtxt), obj, 1);
+       if (len < 1)
                return dcrypt_openssl_error(error_r);
-       if (ln > (int)sizeof(objtxt)) {
+       if (len > (int)sizeof(objtxt)) {
                if (error_r != NULL)
                        *error_r = "Object identifier too long";
                return FALSE;
@@ -1671,10 +1671,10 @@ dcrypt_openssl_store_private_key_dovecot(struct dcrypt_private_key *key,
        if (EVP_PKEY_base_id(pkey) == EVP_PKEY_RSA) {
                unsigned char *ptr;
                RSA *rsa = EVP_PKEY_get0_RSA(pkey);
-               int ln = i2d_RSAPrivateKey(rsa, &ptr);
-               if (ln < 1)
+               int len = i2d_RSAPrivateKey(rsa, &ptr);
+               if (len < 1)
                        return dcrypt_openssl_error(error_r);
-               buffer_append(buf, ptr, ln);
+               buffer_append(buf, ptr, len);
        } else if (EVP_PKEY_base_id(pkey) == EVP_PKEY_EC) {
                unsigned char *ptr;
                EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(pkey);