[PATCH 05/22] KEYS: Provide software public key query function [ver #2]

2018-10-09 Thread David Howells
Provide a query function for the software public key implementation. This permits information about such a key to be obtained using query_asymmetric_key() or KEYCTL_PKEY_QUERY. Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Reviewed-by: Denis Kenzior

[PATCH 05/22] KEYS: Provide software public key query function [ver #2]

2018-10-09 Thread David Howells
Provide a query function for the software public key implementation. This permits information about such a key to be obtained using query_asymmetric_key() or KEYCTL_PKEY_QUERY. Signed-off-by: David Howells Tested-by: Marcel Holtmann Reviewed-by: Marcel Holtmann Reviewed-by: Denis Kenzior

Re: [PATCH 05/22] KEYS: Provide software public key query function

2018-10-09 Thread David Howells
James Morris wrote: > > + if (strcmp(encoding, "raw") == 0) { > > + strcpy(alg_name, pkey->pkey_algo); > > + return 0; > > + } > > Can encoding here also be NULL to indicate raw? per patch 01: Okay, I'm making the attached changes to patch 01. They're

Re: [PATCH 05/22] KEYS: Provide software public key query function

2018-10-09 Thread David Howells
James Morris wrote: > > + if (strcmp(encoding, "raw") == 0) { > > + strcpy(alg_name, pkey->pkey_algo); > > + return 0; > > + } > > Can encoding here also be NULL to indicate raw? per patch 01: Okay, I'm making the attached changes to patch 01. They're

Re: [PATCH 05/22] KEYS: Provide software public key query function

2018-10-05 Thread James Morris
On Sat, 6 Oct 2018, James Morris wrote: > On Fri, 5 Oct 2018, David Howells wrote: > > > James Morris wrote: > > > > > > + if (strcmp(encoding, "raw") == 0) { > > > > + strcpy(alg_name, pkey->pkey_algo); > > > > + return 0; > > > > + } > > > > > > Can

Re: [PATCH 05/22] KEYS: Provide software public key query function

2018-10-05 Thread James Morris
On Sat, 6 Oct 2018, James Morris wrote: > On Fri, 5 Oct 2018, David Howells wrote: > > > James Morris wrote: > > > > > > + if (strcmp(encoding, "raw") == 0) { > > > > + strcpy(alg_name, pkey->pkey_algo); > > > > + return 0; > > > > + } > > > > > > Can

Re: [PATCH 05/22] KEYS: Provide software public key query function

2018-10-05 Thread James Morris
On Fri, 5 Oct 2018, David Howells wrote: > James Morris wrote: > > > > + if (strcmp(encoding, "raw") == 0) { > > > + strcpy(alg_name, pkey->pkey_algo); > > > + return 0; > > > + } > > > > Can encoding here also be NULL to indicate raw? per patch 01: > > Ummm... By the letter

Re: [PATCH 05/22] KEYS: Provide software public key query function

2018-10-05 Thread James Morris
On Fri, 5 Oct 2018, David Howells wrote: > James Morris wrote: > > > > + if (strcmp(encoding, "raw") == 0) { > > > + strcpy(alg_name, pkey->pkey_algo); > > > + return 0; > > > + } > > > > Can encoding here also be NULL to indicate raw? per patch 01: > > Ummm... By the letter

Re: [PATCH 05/22] KEYS: Provide software public key query function

2018-10-05 Thread David Howells
James Morris wrote: > > + if (strcmp(encoding, "raw") == 0) { > > + strcpy(alg_name, pkey->pkey_algo); > > + return 0; > > + } > > Can encoding here also be NULL to indicate raw? per patch 01: Ummm... By the letter of the documentation, yes, though in practice it isn't

Re: [PATCH 05/22] KEYS: Provide software public key query function

2018-10-05 Thread David Howells
James Morris wrote: > > + if (strcmp(encoding, "raw") == 0) { > > + strcpy(alg_name, pkey->pkey_algo); > > + return 0; > > + } > > Can encoding here also be NULL to indicate raw? per patch 01: Ummm... By the letter of the documentation, yes, though in practice it isn't

Re: [PATCH 05/22] KEYS: Provide software public key query function

2018-10-03 Thread James Morris
On Wed, 5 Sep 2018, David Howells wrote: > + if (strcmp(encoding, "raw") == 0) { > + strcpy(alg_name, pkey->pkey_algo); > + return 0; > + } Can encoding here also be NULL to indicate raw? per patch 01: > +struct kernel_pkey_params { > + struct key

Re: [PATCH 05/22] KEYS: Provide software public key query function

2018-10-03 Thread James Morris
On Wed, 5 Sep 2018, David Howells wrote: > + if (strcmp(encoding, "raw") == 0) { > + strcpy(alg_name, pkey->pkey_algo); > + return 0; > + } Can encoding here also be NULL to indicate raw? per patch 01: > +struct kernel_pkey_params { > + struct key

[PATCH 05/22] KEYS: Provide software public key query function

2018-09-05 Thread David Howells
Provide a query function for the software public key implementation. This permits information about such a key to be obtained using query_asymmetric_key() or KEYCTL_PKEY_QUERY. Signed-off-by: David Howells --- crypto/asymmetric_keys/public_key.c | 99 +-- 1

[PATCH 05/22] KEYS: Provide software public key query function

2018-09-05 Thread David Howells
Provide a query function for the software public key implementation. This permits information about such a key to be obtained using query_asymmetric_key() or KEYCTL_PKEY_QUERY. Signed-off-by: David Howells --- crypto/asymmetric_keys/public_key.c | 99 +-- 1