All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tls: fixed intentation in X509 definitions
@ 2018-11-17  0:04 James Prestwood
  2018-11-17  0:09 ` Mat Martineau
  0 siblings, 1 reply; 4+ messages in thread
From: James Prestwood @ 2018-11-17  0:04 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 2035 bytes --]

Someones editor must have been misbehaving
---
 ell/tls.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/ell/tls.c b/ell/tls.c
index 9dc97ff..2d2dd4b 100644
--- a/ell/tls.c
+++ b/ell/tls.c
@@ -2549,23 +2549,23 @@ const char *tls_handshake_state_to_str(enum tls_handshake_state state)
 /* X509 Certificates and Certificate Chains */
 
 #define X509_CERTIFICATE_POS			0
-#define   X509_TBSCERTIFICATE_POS		  0
-#define     X509_TBSCERT_VERSION_POS		    0
-#define     X509_TBSCERT_SERIAL_POS		    1
-#define     X509_TBSCERT_SIGNATURE_POS		    2
-#define       X509_ALGORITHM_ID_ALGORITHM_POS	      0
-#define       X509_ALGORITHM_ID_PARAMS_POS	      1
-#define     X509_TBSCERT_ISSUER_DN_POS		    3
-#define     X509_TBSCERT_VALIDITY_POS		    4
-#define     X509_TBSCERT_SUBJECT_DN_POS		    5
-#define     X509_TBSCERT_SUBJECT_KEY_POS	    6
-#define       X509_SUBJECT_KEY_ALGORITHM_POS	      0
-#define       X509_SUBJECT_KEY_VALUE_POS	      1
-#define     X509_TBSCERT_ISSUER_UID_POS		    7
-#define     X509_TBSCERT_SUBJECT_UID_POS	    8
-#define     X509_TBSCERT_EXTENSIONS_POS		    9
-#define   X509_SIGNATURE_ALGORITHM_POS		  1
-#define   X509_SIGNATURE_VALUE_POS		  2
+#define X509_TBSCERTIFICATE_POS			0
+#define X509_TBSCERT_VERSION_POS		0
+#define X509_TBSCERT_SERIAL_POS			1
+#define X509_TBSCERT_SIGNATURE_POS		2
+#define X509_ALGORITHM_ID_ALGORITHM_POS		0
+#define X509_ALGORITHM_ID_PARAMS_POS		1
+#define X509_TBSCERT_ISSUER_DN_POS		3
+#define X509_TBSCERT_VALIDITY_POS		4
+#define X509_TBSCERT_SUBJECT_DN_POS		5
+#define X509_TBSCERT_SUBJECT_KEY_POS		6
+#define X509_SUBJECT_KEY_ALGORITHM_POS		0
+#define X509_SUBJECT_KEY_VALUE_POS		1
+#define X509_TBSCERT_ISSUER_UID_POS		7
+#define X509_TBSCERT_SUBJECT_UID_POS		8
+#define X509_TBSCERT_EXTENSIONS_POS		9
+#define X509_SIGNATURE_ALGORITHM_POS		1
+#define X509_SIGNATURE_VALUE_POS		2
 
 struct tls_cert *tls_cert_load_file(const char *filename)
 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tls: fixed intentation in X509 definitions
  2018-11-17  0:04 [PATCH] tls: fixed intentation in X509 definitions James Prestwood
@ 2018-11-17  0:09 ` Mat Martineau
  2018-11-17  0:12   ` Mat Martineau
  2018-11-19 17:01   ` James Prestwood
  0 siblings, 2 replies; 4+ messages in thread
From: Mat Martineau @ 2018-11-17  0:09 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 2543 bytes --]


Hi James -

On Fri, 16 Nov 2018, James Prestwood wrote:

> Someones editor must have been misbehaving

Looks like the existing indentation is intended to reflect the nexted 
structure of the certificates. For example, look at the sequence of 
numbers in each column.

Mat

> ---
> ell/tls.c | 34 +++++++++++++++++-----------------
> 1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/ell/tls.c b/ell/tls.c
> index 9dc97ff..2d2dd4b 100644
> --- a/ell/tls.c
> +++ b/ell/tls.c
> @@ -2549,23 +2549,23 @@ const char *tls_handshake_state_to_str(enum tls_handshake_state state)
> /* X509 Certificates and Certificate Chains */
>
> #define X509_CERTIFICATE_POS			0
> -#define   X509_TBSCERTIFICATE_POS		  0
> -#define     X509_TBSCERT_VERSION_POS		    0
> -#define     X509_TBSCERT_SERIAL_POS		    1
> -#define     X509_TBSCERT_SIGNATURE_POS		    2
> -#define       X509_ALGORITHM_ID_ALGORITHM_POS	      0
> -#define       X509_ALGORITHM_ID_PARAMS_POS	      1
> -#define     X509_TBSCERT_ISSUER_DN_POS		    3
> -#define     X509_TBSCERT_VALIDITY_POS		    4
> -#define     X509_TBSCERT_SUBJECT_DN_POS		    5
> -#define     X509_TBSCERT_SUBJECT_KEY_POS	    6
> -#define       X509_SUBJECT_KEY_ALGORITHM_POS	      0
> -#define       X509_SUBJECT_KEY_VALUE_POS	      1
> -#define     X509_TBSCERT_ISSUER_UID_POS		    7
> -#define     X509_TBSCERT_SUBJECT_UID_POS	    8
> -#define     X509_TBSCERT_EXTENSIONS_POS		    9
> -#define   X509_SIGNATURE_ALGORITHM_POS		  1
> -#define   X509_SIGNATURE_VALUE_POS		  2
> +#define X509_TBSCERTIFICATE_POS			0
> +#define X509_TBSCERT_VERSION_POS		0
> +#define X509_TBSCERT_SERIAL_POS			1
> +#define X509_TBSCERT_SIGNATURE_POS		2
> +#define X509_ALGORITHM_ID_ALGORITHM_POS		0
> +#define X509_ALGORITHM_ID_PARAMS_POS		1
> +#define X509_TBSCERT_ISSUER_DN_POS		3
> +#define X509_TBSCERT_VALIDITY_POS		4
> +#define X509_TBSCERT_SUBJECT_DN_POS		5
> +#define X509_TBSCERT_SUBJECT_KEY_POS		6
> +#define X509_SUBJECT_KEY_ALGORITHM_POS		0
> +#define X509_SUBJECT_KEY_VALUE_POS		1
> +#define X509_TBSCERT_ISSUER_UID_POS		7
> +#define X509_TBSCERT_SUBJECT_UID_POS		8
> +#define X509_TBSCERT_EXTENSIONS_POS		9
> +#define X509_SIGNATURE_ALGORITHM_POS		1
> +#define X509_SIGNATURE_VALUE_POS		2
>
> struct tls_cert *tls_cert_load_file(const char *filename)
> {
> -- 
> 2.17.1
>
> _______________________________________________
> ell mailing list
> ell(a)lists.01.org
> https://lists.01.org/mailman/listinfo/ell
>

--
Mat Martineau
Intel OTC

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tls: fixed intentation in X509 definitions
  2018-11-17  0:09 ` Mat Martineau
@ 2018-11-17  0:12   ` Mat Martineau
  2018-11-19 17:01   ` James Prestwood
  1 sibling, 0 replies; 4+ messages in thread
From: Mat Martineau @ 2018-11-17  0:12 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 2931 bytes --]


On Fri, 16 Nov 2018, Mat Martineau wrote:

>
> Hi James -
>
> On Fri, 16 Nov 2018, James Prestwood wrote:
>
>> Someones editor must have been misbehaving
>
> Looks like the existing indentation is intended to reflect the nested

(fixed typo)                                                       ^

> structure of the certificates. For example, look at the sequence of numbers 
> in each column.
>

Mat

>
>> ---
>> ell/tls.c | 34 +++++++++++++++++-----------------
>> 1 file changed, 17 insertions(+), 17 deletions(-)
>> 
>> diff --git a/ell/tls.c b/ell/tls.c
>> index 9dc97ff..2d2dd4b 100644
>> --- a/ell/tls.c
>> +++ b/ell/tls.c
>> @@ -2549,23 +2549,23 @@ const char *tls_handshake_state_to_str(enum 
>> tls_handshake_state state)
>> /* X509 Certificates and Certificate Chains */
>> 
>> #define X509_CERTIFICATE_POS			0
>> -#define   X509_TBSCERTIFICATE_POS		  0
>> -#define     X509_TBSCERT_VERSION_POS		    0
>> -#define     X509_TBSCERT_SERIAL_POS		    1
>> -#define     X509_TBSCERT_SIGNATURE_POS		    2
>> -#define       X509_ALGORITHM_ID_ALGORITHM_POS	      0
>> -#define       X509_ALGORITHM_ID_PARAMS_POS	      1
>> -#define     X509_TBSCERT_ISSUER_DN_POS		    3
>> -#define     X509_TBSCERT_VALIDITY_POS		    4
>> -#define     X509_TBSCERT_SUBJECT_DN_POS		    5
>> -#define     X509_TBSCERT_SUBJECT_KEY_POS	    6
>> -#define       X509_SUBJECT_KEY_ALGORITHM_POS	      0
>> -#define       X509_SUBJECT_KEY_VALUE_POS	      1
>> -#define     X509_TBSCERT_ISSUER_UID_POS		    7
>> -#define     X509_TBSCERT_SUBJECT_UID_POS	    8
>> -#define     X509_TBSCERT_EXTENSIONS_POS		    9
>> -#define   X509_SIGNATURE_ALGORITHM_POS		  1
>> -#define   X509_SIGNATURE_VALUE_POS		  2
>> +#define X509_TBSCERTIFICATE_POS			0
>> +#define X509_TBSCERT_VERSION_POS		0
>> +#define X509_TBSCERT_SERIAL_POS			1
>> +#define X509_TBSCERT_SIGNATURE_POS		2
>> +#define X509_ALGORITHM_ID_ALGORITHM_POS		0
>> +#define X509_ALGORITHM_ID_PARAMS_POS		1
>> +#define X509_TBSCERT_ISSUER_DN_POS		3
>> +#define X509_TBSCERT_VALIDITY_POS		4
>> +#define X509_TBSCERT_SUBJECT_DN_POS		5
>> +#define X509_TBSCERT_SUBJECT_KEY_POS		6
>> +#define X509_SUBJECT_KEY_ALGORITHM_POS		0
>> +#define X509_SUBJECT_KEY_VALUE_POS		1
>> +#define X509_TBSCERT_ISSUER_UID_POS		7
>> +#define X509_TBSCERT_SUBJECT_UID_POS		8
>> +#define X509_TBSCERT_EXTENSIONS_POS		9
>> +#define X509_SIGNATURE_ALGORITHM_POS		1
>> +#define X509_SIGNATURE_VALUE_POS		2
>> 
>> struct tls_cert *tls_cert_load_file(const char *filename)
>> {
>> -- 
>> 2.17.1
>> 
>> _______________________________________________
>> ell mailing list
>> ell(a)lists.01.org
>> https://lists.01.org/mailman/listinfo/ell
>> 
>
> --
> Mat Martineau
> Intel OTC
> _______________________________________________
> ell mailing list
> ell(a)lists.01.org
> https://lists.01.org/mailman/listinfo/ell
>

--
Mat Martineau
Intel OTC

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tls: fixed intentation in X509 definitions
  2018-11-17  0:09 ` Mat Martineau
  2018-11-17  0:12   ` Mat Martineau
@ 2018-11-19 17:01   ` James Prestwood
  1 sibling, 0 replies; 4+ messages in thread
From: James Prestwood @ 2018-11-19 17:01 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 2900 bytes --]

On Fri, 2018-11-16 at 16:09 -0800, Mat Martineau wrote:
> Hi James -
> 
> On Fri, 16 Nov 2018, James Prestwood wrote:
> 
> > Someones editor must have been misbehaving
> 
> Looks like the existing indentation is intended to reflect the
> nexted 
> structure of the certificates. For example, look at the sequence of 
> numbers in each column.

Ah ok that makes sense. You can disregard this then, it just looked
very strange at first paging through the code :)

Thanks,
James

> 
> Mat
> 
> > ---
> > ell/tls.c | 34 +++++++++++++++++-----------------
> > 1 file changed, 17 insertions(+), 17 deletions(-)
> > 
> > diff --git a/ell/tls.c b/ell/tls.c
> > index 9dc97ff..2d2dd4b 100644
> > --- a/ell/tls.c
> > +++ b/ell/tls.c
> > @@ -2549,23 +2549,23 @@ const char *tls_handshake_state_to_str(enum
> > tls_handshake_state state)
> > /* X509 Certificates and Certificate Chains */
> > 
> > #define X509_CERTIFICATE_POS			0
> > -#define   X509_TBSCERTIFICATE_POS		  0
> > -#define     X509_TBSCERT_VERSION_POS		    0
> > -#define     X509_TBSCERT_SERIAL_POS		    1
> > -#define     X509_TBSCERT_SIGNATURE_POS		    2
> > -#define       X509_ALGORITHM_ID_ALGORITHM_POS	      0
> > -#define       X509_ALGORITHM_ID_PARAMS_POS	      1
> > -#define     X509_TBSCERT_ISSUER_DN_POS		    3
> > -#define     X509_TBSCERT_VALIDITY_POS		    4
> > -#define     X509_TBSCERT_SUBJECT_DN_POS		    5
> > -#define     X509_TBSCERT_SUBJECT_KEY_POS	    6
> > -#define       X509_SUBJECT_KEY_ALGORITHM_POS	      0
> > -#define       X509_SUBJECT_KEY_VALUE_POS	      1
> > -#define     X509_TBSCERT_ISSUER_UID_POS		    7
> > -#define     X509_TBSCERT_SUBJECT_UID_POS	    8
> > -#define     X509_TBSCERT_EXTENSIONS_POS		    9
> > -#define   X509_SIGNATURE_ALGORITHM_POS		  1
> > -#define   X509_SIGNATURE_VALUE_POS		  2
> > +#define X509_TBSCERTIFICATE_POS			0
> > +#define X509_TBSCERT_VERSION_POS		0
> > +#define X509_TBSCERT_SERIAL_POS			1
> > +#define X509_TBSCERT_SIGNATURE_POS		2
> > +#define X509_ALGORITHM_ID_ALGORITHM_POS		0
> > +#define X509_ALGORITHM_ID_PARAMS_POS		1
> > +#define X509_TBSCERT_ISSUER_DN_POS		3
> > +#define X509_TBSCERT_VALIDITY_POS		4
> > +#define X509_TBSCERT_SUBJECT_DN_POS		5
> > +#define X509_TBSCERT_SUBJECT_KEY_POS		6
> > +#define X509_SUBJECT_KEY_ALGORITHM_POS		0
> > +#define X509_SUBJECT_KEY_VALUE_POS		1
> > +#define X509_TBSCERT_ISSUER_UID_POS		7
> > +#define X509_TBSCERT_SUBJECT_UID_POS		8
> > +#define X509_TBSCERT_EXTENSIONS_POS		9
> > +#define X509_SIGNATURE_ALGORITHM_POS		1
> > +#define X509_SIGNATURE_VALUE_POS		2
> > 
> > struct tls_cert *tls_cert_load_file(const char *filename)
> > {
> > -- 
> > 2.17.1
> > 
> > _______________________________________________
> > ell mailing list
> > ell(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/ell
> > 
> 
> --
> Mat Martineau
> Intel OTC


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-19 17:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-17  0:04 [PATCH] tls: fixed intentation in X509 definitions James Prestwood
2018-11-17  0:09 ` Mat Martineau
2018-11-17  0:12   ` Mat Martineau
2018-11-19 17:01   ` James Prestwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.