Re: [PATCH] advapi32: Add magic codes to HCRYPTKEY and HCRYPTHASH.

2010-08-18 Thread Austin Lund
On 18 August 2010 20:44, GOUJON Alexandre wrote: > On 08/18/2010 12:22 PM, Hans Leidekker wrote: >> >> They are often built from four character ascii strings to help find out >> where the structures come from. I don't know why this one was chosen >> but I guess you could use something like 0xA39E7

Re: [PATCH] advapi32: Add magic codes to HCRYPTKEY and HCRYPTHASH.

2010-08-18 Thread GOUJON Alexandre
On 08/18/2010 12:22 PM, Hans Leidekker wrote: They are often built from four character ascii strings to help find out where the structures come from. I don't know why this one was chosen but I guess you could use something like 0xA39E741E and 0xA39E741D. Yep, there are some magic values at h

Re: [PATCH] advapi32: Add magic codes to HCRYPTKEY and HCRYPTHASH.

2010-08-18 Thread Hans Leidekker
On Wed, 2010-08-18 at 20:02 +1000, Austin Lund wrote: > On 18 August 2010 18:34, Hans Leidekker wrote: > > On Wed, 2010-08-18 at 10:14 +1000, Austin Lund wrote: > > > >> #define MAGIC_CRYPTPROV 0xA39E741F > >> +#define MAGIC_CRYPTKEY 0xA39E741F > >> +#define MAGIC_CRYPTHASH 0xA39E741F > > > > Th

Re: [PATCH] advapi32: Add magic codes to HCRYPTKEY and HCRYPTHASH.

2010-08-18 Thread Austin Lund
On 18 August 2010 18:34, Hans Leidekker wrote: > On Wed, 2010-08-18 at 10:14 +1000, Austin Lund wrote: > >>  #define MAGIC_CRYPTPROV 0xA39E741F >> +#define MAGIC_CRYPTKEY 0xA39E741F >> +#define MAGIC_CRYPTHASH 0xA39E741F > > The app might pass a crypto handle of the wrong type, so it would be > be

Re: [PATCH] advapi32: Add magic codes to HCRYPTKEY and HCRYPTHASH.

2010-08-18 Thread Hans Leidekker
On Wed, 2010-08-18 at 10:14 +1000, Austin Lund wrote: > #define MAGIC_CRYPTPROV 0xA39E741F > +#define MAGIC_CRYPTKEY 0xA39E741F > +#define MAGIC_CRYPTHASH 0xA39E741F The app might pass a crypto handle of the wrong type, so it would be better to use different magic values.