gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] client-side TLS 1.2 support


From: Simon Josefsson
Subject: Re: [PATCH] client-side TLS 1.2 support
Date: Mon, 31 Aug 2009 14:22:36 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

Daiki Ueno <address@hidden> writes:

>>>>>> In <address@hidden> 
>>>>>>  Simon Josefsson <address@hidden> wrote:
>> >  static const gnutls_sign_entry sign_algorithms[] = {
>> >    {"RSA-SHA", SIG_RSA_SHA1_OID, GNUTLS_SIGN_RSA_SHA1, GNUTLS_PK_RSA,
>> > -   GNUTLS_MAC_SHA1},
>> > +   GNUTLS_MAC_SHA1, {2, 1}},
>> >    {"RSA-SHA256", SIG_RSA_SHA256_OID, GNUTLS_SIGN_RSA_SHA256, 
>> > GNUTLS_PK_RSA,
>> > -   GNUTLS_MAC_SHA256},
>> > +   GNUTLS_MAC_SHA256, {4, 1}},
>
>> Please define some constants here instead of using hard coded values.
>
> OK, here it is:

Thanks.

> +#define TLS_SIGN_AID_RSA_SHA1 {2, 1}
> +#define TLS_SIGN_AID_RSA_SHA256 {4, 1}
> +#define TLS_SIGN_AID_RSA_SHA384 {5, 1}
> +#define TLS_SIGN_AID_RSA_SHA512 {6, 1}
> +#define TLS_SIGN_AID_DSA_SHA1 {2, 2}
> +#define TLS_SIGN_AID_RSA_MD5 {1, 2}

Where does these "magic" values come from?  It was these values that I
would prefer to use symbolic names for.

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]