Re: [PATCH 1/3] lib/oid_registry: add ability to ASN.1 encode OIDs

2024-05-26 Thread Ben Boeckel
On Fri, May 24, 2024 at 08:59:53 -0400, James Bottomley wrote: > Consumers of the ASN.1 encoder occasionally need to insert OIDs into > the ASN.1 stream. The existing interface in lib/asn1_encoder.c is > clunky in that it directly encodes the u32 array form of the OID. > Instead introduce a functi

Re: [PATCH 1/3] lib/oid_registry: add ability to ASN.1 encode OIDs

2024-05-24 Thread Jarkko Sakkinen
On Fri May 24, 2024 at 5:26 PM EEST, Jarkko Sakkinen wrote: > On Fri May 24, 2024 at 5:02 PM EEST, James Bottomley wrote: > > On Fri, 2024-05-24 at 16:34 +0300, Jarkko Sakkinen wrote: > > > On Fri May 24, 2024 at 3:59 PM EEST, James Bottomley wrote: > > [...] > > > > diff --git a/include/linux/oid_

Re: [PATCH 1/3] lib/oid_registry: add ability to ASN.1 encode OIDs

2024-05-24 Thread Jarkko Sakkinen
On Fri May 24, 2024 at 5:02 PM EEST, James Bottomley wrote: > On Fri, 2024-05-24 at 16:34 +0300, Jarkko Sakkinen wrote: > > On Fri May 24, 2024 at 3:59 PM EEST, James Bottomley wrote: > [...] > > > diff --git a/include/linux/oid_registry.h > > > b/include/linux/oid_registry.h > > > index 51421fdbb0

Re: [PATCH 1/3] lib/oid_registry: add ability to ASN.1 encode OIDs

2024-05-24 Thread James Bottomley
On Fri, 2024-05-24 at 16:34 +0300, Jarkko Sakkinen wrote: > On Fri May 24, 2024 at 3:59 PM EEST, James Bottomley wrote: [...] > > diff --git a/include/linux/oid_registry.h > > b/include/linux/oid_registry.h > > index 51421fdbb0ba..87a6bcb2f5c0 100644 > > --- a/include/linux/oid_registry.h > > +++ b

Re: [PATCH 1/3] lib/oid_registry: add ability to ASN.1 encode OIDs

2024-05-24 Thread Jarkko Sakkinen
On Fri May 24, 2024 at 3:59 PM EEST, James Bottomley wrote: > Consumers of the ASN.1 encoder occasionally need to insert OIDs into > the ASN.1 stream. The existing interface in lib/asn1_encoder.c is > clunky in that it directly encodes the u32 array form of the OID. > Instead introduce a function,

[PATCH 1/3] lib/oid_registry: add ability to ASN.1 encode OIDs

2024-05-24 Thread James Bottomley
Consumers of the ASN.1 encoder occasionally need to insert OIDs into the ASN.1 stream. The existing interface in lib/asn1_encoder.c is clunky in that it directly encodes the u32 array form of the OID. Instead introduce a function, encode_OID() which takes the OID enum and returns the ASN.1 encodin