lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1406635365.25105.18.camel@dhcp-9-2-203-236.watson.ibm.com>
Date:	Tue, 29 Jul 2014 08:02:45 -0400
From:	Mimi Zohar <zohar@...ux.vnet.ibm.com>
To:	David Howells <dhowells@...hat.com>
Cc:	d.kasatkin@...sung.com, keyrings@...ux-nfs.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] X.509: x509_request_asymmetric_keys() doesn't need
 string length arguments

On Mon, 2014-07-28 at 14:54 +0100, David Howells wrote: 
> x509_request_asymmetric_keys() doesn't need the lengths of the NUL-terminated
> strings passing in as it can work that out for itself.
> 
> Signed-off-by: David Howells <dhowells@...hat.com>

Acked-by: Mimi Zohar <zohar@...ux.vnet.ibm.com>

> ---
>  crypto/asymmetric_keys/x509_public_key.c |    9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c
> index a0f7cd196c9b..4ae982234d78 100644
> --- a/crypto/asymmetric_keys/x509_public_key.c
> +++ b/crypto/asymmetric_keys/x509_public_key.c
> @@ -48,11 +48,10 @@ __setup("ca_keys=", ca_keys_setup);
>   */
>  static struct key *x509_request_asymmetric_key(struct key *keyring,
>  					       const char *signer,
> -					       size_t signer_len,
> -					       const char *authority,
> -					       size_t auth_len)
> +					       const char *authority)
>  {
>  	key_ref_t key;
> +	size_t signer_len = strlen(signer), auth_len = strlen(authority);
>  	char *id;
> 
>  	/* Construct an identifier. */
> @@ -193,9 +192,7 @@ static int x509_validate_trust(struct x509_certificate *cert,
>  		return -EPERM;
> 
>  	key = x509_request_asymmetric_key(trust_keyring,
> -					  cert->issuer, strlen(cert->issuer),
> -					  cert->authority,
> -					  strlen(cert->authority));
> +					  cert->issuer, cert->authority);
>  	if (!IS_ERR(key))  {
>  		if (!use_builtin_keys
>  		    || test_bit(KEY_FLAG_BUILTIN, &key->flags))
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ