You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "Roy T. Fielding" <fi...@ebuilt.com> on 2001/12/31 23:16:39 UTC
Re: cvs commit: apr/misc/win32 rand.c
On Sun, Dec 30, 2001 at 07:50:47PM -0000, wrowe@apache.org wrote:
> --- rand.c 29 Dec 2001 03:33:49 -0000 1.11
> +++ rand.c 30 Dec 2001 19:50:46 -0000 1.12
> @@ -62,8 +62,10 @@
> HCRYPTPROV hProv;
> apr_status_t res = APR_SUCCESS;
>
> + /* 0x40 bit = CRYPT_SILENT, only introduced in more recent PSDKs
> + */
> if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL,
> - CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
> + CRYPT_VERIFYCONTEXT | 0x40)) {
Eh? Why didn't you do
#ifndef CRYPT_SILENT
#define CRYPT_SILENT 0x40
#endif
....Roy
Re: cvs commit: apr/misc/win32 rand.c
Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Roy T. Fielding" <fi...@ebuilt.com>
Sent: Monday, December 31, 2001 4:16 PM
> On Sun, Dec 30, 2001 at 07:50:47PM -0000, wrowe@apache.org wrote:
> > --- rand.c 29 Dec 2001 03:33:49 -0000 1.11
> > +++ rand.c 30 Dec 2001 19:50:46 -0000 1.12
> > @@ -62,8 +62,10 @@
> > HCRYPTPROV hProv;
> > apr_status_t res = APR_SUCCESS;
> >
> > + /* 0x40 bit = CRYPT_SILENT, only introduced in more recent PSDKs
> > + */
> > if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL,
> > - CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
> > + CRYPT_VERIFYCONTEXT | 0x40)) {
>
> Eh? Why didn't you do
>
> #ifndef CRYPT_SILENT
> #define CRYPT_SILENT 0x40
> #endif
Suppose that would work just as well...
I'm actually considering
#ifndef CRYPT_SILENT
#define CRYPT_SILENT 0x40
#elif CRYPT_SILENT != 0x40
#error "The CRYPT_SILENT define has changed... please correct and rebuild"
#endif
and moving the whole lot of them [several others used in file_io] into a
winfixsdk.h hiding over in apr/misc/win32/. Comments?
Bill