NGINX 1.0.3 compile error: src/core/ngx crypt.c: In function ‘ngx crypt apr1’

Hi,

i’m having problems compiling the latest stable source 1.0.3.

How to reproduce:

cd
./configure
make

make output is attached in log.txt

I do not have any problems compiling stable source 1.0.2

Is suspect this issue beeing a bug. Can somebody confirm this?

Thanks in advance!

Cheers,
DJ

HEROLD Business Data GmbH
Guntramsdorfer Straße 105
A-2340 Mödling

FN 233171z
Landesgericht Wiener Neustadt

Besuchen Sie uns online und mobil www.herold.at!

Weitere Informationen zu unseren Produkten finden Sie unter:
http://mobile.herold.at
http://daten.herold.at

Werden Sie Fan von HEROLD auf Facebook!

Bitte beachten Sie auch unsere Tochter- und Partner-Unternehmen:
www.clearsense.at
www.tupalo.com
www.aboutmedia.at
www.love.at
www.reise-hero.at
www.urlauburlaub.at

Diese E-Mail kann vertrauliche und/oder rechtlich geschützte
Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder
diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail sind nicht gestattet.

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and delete this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

On Fri, May 27, 2011 at 11:30:17AM +0200, Dalibor J. wrote:

make output is attached in log.txt

I do not have any problems compiling stable source 1.0.2

Is suspect this issue beeing a bug. Can somebody confirm this?

gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I
src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_crypt.o
src/core/ngx_crypt.c
cc1: warnings being treated as errors
src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’:
src/core/ngx_crypt.c:76: warning: pointer targets in passing argument 2 of
‘ngx_md5_update’ differ in signedness

Thank you for the report.
The attached patch should fix the issue.

Hello!

On Fri, May 27, 2011 at 01:57:45PM +0400, Igor S. wrote:

cc1: warnings being treated as errors
src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’:
src/core/ngx_crypt.c:76: warning: pointer targets in passing argument 2 of
‘ngx_md5_update’ differ in signedness

Thank you for the report.
The attached patch should fix the issue.


Igor S.

Index: src/core/ngx_md5.c

— src/core/ngx_md5.c (revision 3927)
+++ src/core/ngx_md5.c (working copy)
@@ -32,7 +32,7 @@

void
-ngx_md5_update(ngx_md5_t *ctx, const u_char *data, size_t size)
+ngx_md5_update(ngx_md5_t *ctx, const void *data, size_t size)

$ grep MD5Update /usr/include/sys/md5.h
void MD5Update (MD5_CTX *, const unsigned char *, unsigned int);

So this is required anyway:

diff --git a/src/core/ngx_crypt.c b/src/core/ngx_crypt.c
— a/src/core/ngx_crypt.c
+++ b/src/core/ngx_crypt.c
@@ -74,7 +74,7 @@ ngx_crypt_apr1(ngx_pool_t *pool, u_char

 ngx_md5_init(&md5);
 ngx_md5_update(&md5, key, keylen);
  • ngx_md5_update(&md5, “$apr1$”, sizeof("$apr1$") - 1);
  • ngx_md5_update(&md5, (u_char *) “$apr1$”, sizeof("$apr1$") - 1);
    ngx_md5_update(&md5, salt, saltlen);

    ngx_md5_init(&ctx1);

Sorry for the breakage. BTW, it’s probably good idea to finally
branch stable-1.0 and start releasing 1.1.*.

Maxim D.

Hi,

that patch fixed the issue. Many thanks for the very fast support!

Regards,
DJ

Igor S. [email protected] 5/27/2011 11:57 >>>
On Fri, May 27, 2011 at 11:30:17AM +0200, Dalibor J. wrote:
make output is attached in log.txt

I do not have any problems compiling stable source 1.0.2

Is suspect this issue beeing a bug. Can somebody confirm this?

gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I
src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_crypt.o
src/core/ngx_crypt.c
cc1: warnings being treated as errors
src/core/ngx_crypt.c: In function Б─≤ngx_crypt_apr1Б─≥:
src/core/ngx_crypt.c:76: warning: pointer targets in passing argument
2 of Б─≤ngx_md5_updateБ─≥ differ in signedness

Thank you for the report.
The attached patch should fix the issue.


Igor S.

HEROLD Business Data GmbH
Guntramsdorfer Straße 105
A-2340 Mödling

FN 233171z
Landesgericht Wiener Neustadt

Besuchen Sie uns online und mobil www.herold.at!

Weitere Informationen zu unseren Produkten finden Sie unter:
http://mobile.herold.at
http://daten.herold.at

Werden Sie Fan von HEROLD auf Facebook!

Bitte beachten Sie auch unsere Tochter- und Partner-Unternehmen:
www.clearsense.at
www.tupalo.com
www.aboutmedia.at
www.love.at
www.reise-hero.at
www.urlauburlaub.at

Diese E-Mail kann vertrauliche und/oder rechtlich geschützte
Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder
diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail sind nicht gestattet.

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and delete this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

On Fri, May 27, 2011 at 04:18:30PM +0400, Igor S. wrote:

-ngx_md5_update(ngx_md5_t *ctx, const u_char *data, size_t size)
[ … ]
void MD5Update (MD5_CTX *, const void *, unsigned int);
It seems you looked at FreeBSD prior to 7.0-CURRENT,
this has been changed on 17.01.2006.


Igor S.

Hello!

On Fri, May 27, 2011 at 04:18:30PM +0400, Igor S. wrote:

-ngx_md5_update(ngx_md5_t *ctx, const u_char *data, size_t size)
+ngx_md5_update(ngx_md5_t *ctx, const void *data, size_t size)

$ grep MD5Update /usr/include/sys/md5.h
void MD5Update (MD5_CTX *, const unsigned char *, unsigned int);

What OS ?

FreeBSD 6.

This was changed in 7+, see
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/md5.h#rev1.19

Maxim D.

On Fri, May 27, 2011 at 04:07:47PM +0400, Maxim D. wrote:

$ grep MD5Update /usr/include/sys/md5.h
void MD5Update (MD5_CTX *, const unsigned char *, unsigned int);

What OS ?

$ man 3 md5 (MacOSX 10.6)
[ … ]
#include <openssl/md5.h>
[ … ]
int MD5_Update(MD5_CTX *c, const void *data,
unsigned long len);

$ man 3 md5 (FreeBSD 7-8)
[ … ]
#include <md5.h>
[ … ]
MD5Update(MD5_CTX *context, const void *data, unsigned int len);

$ grep MD5Update /usr/include/sys/md5.h
void MD5Update (MD5_CTX *, const void *, unsigned int);


Igor S.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs