Opened 8 years ago

Closed 7 years ago

#5 closed Bug / Defect (fixed)

Fix OpenSSL-1.0.0 compilation warnings

Reported by: dazo Owned by: chantra
Priority: major Milestone: beta 2.2
Component: Building / Compiling Version: OpenVPN git master branch (Community Ed)
Severity: Patch Queue: Awaiting testing before ACK Keywords:
Cc:

Description (last modified by dazo)

Compiled the master branch from openvpn-testing.git on Fedora 12, and
noticed these warnings:


ssl.c: In function ‘verify_callback’:
ssl.c:944: warning: passing argument 1 of ‘sk_num’ from incompatible
pointer type
/usr/include/openssl/stack.h:79: note: expected ‘const struct _STACK *’
but argument is of type ‘struct stack_st_X509_REVOKED *’
ssl.c:947: warning: passing argument 1 of ‘sk_value’ from incompatible
pointer type
/usr/include/openssl/stack.h:80: note: expected ‘const struct _STACK *’
but argument is of type ‘struct stack_st_X509_REVOKED *’
ssl.c: In function ‘init_ssl’:
ssl.c:1565: warning: passing argument 1 of ‘sk_num’ from incompatible
pointer type
/usr/include/openssl/stack.h:79: note: expected ‘const struct _STACK *’
but argument is of type ‘struct stack_st_X509 *’
ssl.c: In function ‘print_details’:
ssl.c:1766: warning: assignment discards qualifiers from pointer target type


$ rpm -q openssl openssl-devel
openssl-1.0.0-0.13.beta4.fc12.x86_64
openssl-devel-1.0.0-0.13.beta4.fc12.x86_64

http://thread.gmane.org/gmane.network.openvpn.devel/3091

Attachments (2)

0001-Fixes-openssl-1.0.0-compilation-warning.patch.gz (799 bytes) - added by chantra 8 years ago.
0001-Fixes-openssl-1.0.0-compilation-warning.patch (1.3 KB) - added by chantra 8 years ago.
same patch viewable online

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by dazo

  • Description modified (diff)
  • Milestone set to beta 2.2

comment:2 Changed 8 years ago by dazo

  • Owner set to dazo
  • Status changed from new to accepted

comment:3 Changed 8 years ago by chantra

Hopefully attachment:0001-Fixes-openssl-1.0.0-compilation-warning.patch.gz will solves it.

I could compile openvpn correctly using openssl-1.0.0a and 0.9.8k-7ubuntu8

Changed 8 years ago by chantra

same patch viewable online

comment:4 Changed 8 years ago by dazo

  • Owner changed from dazo to chantra
  • Severity changed from Not set (if unsure, select this one) to Patch Queue: Awaiting testing before ACK
  • Status changed from accepted to assigned

comment:5 Changed 8 years ago by dazo

Thanks a lot! I've tested compiling this patch on an older
openssl-0.9.8e and openssl-1.0.0a. I've tested the patch with
openssl-1.0.0a running openvpn as a client as well.

I'll do some more testing on this patch, with openssl-0.9.8e both as a
server and client. If that looks good, you'll get an ACK :)

Thanks again for great work!

comment:6 Changed 7 years ago by dazo

  • Resolution set to fixed
  • Status changed from assigned to closed

Applied to the bugfix2.1 branch.

commit db3fb3d489df234c78ddcb9fce66de4d8fbb28e6
Author: chantra <chantra@…>
Date: Fri Jul 16 20:09:07 2010 +0200

Fixes openssl-1.0.0 compilation warning


When compiling against OpenSSL v1.0.0, the following compiler warnings
appears.


ssl.c: In function ‘verify_callback’:
ssl.c:944: warning: passing argument 1 of ‘sk_num’ from incompatible
pointer type
/usr/include/openssl/stack.h:79: note: expected ‘const struct _STACK *’
but argument is of type ‘struct stack_st_X509_REVOKED *’
ssl.c:947: warning: passing argument 1 of ‘sk_value’ from incompatible
pointer type
/usr/include/openssl/stack.h:80: note: expected ‘const struct _STACK *’
but argument is of type ‘struct stack_st_X509_REVOKED *’
ssl.c: In function ‘init_ssl’:
ssl.c:1565: warning: passing argument 1 of ‘sk_num’ from incompatible
pointer type
/usr/include/openssl/stack.h:79: note: expected ‘const struct _STACK *’
but argument is of type ‘struct stack_st_X509 *’
ssl.c: In function ‘print_details’:
ssl.c:1766: warning: assignment discards qualifiers from pointer target type


Trac ticket #5
https://community.openvpn.net/openvpn/ticket/5


Signed-off-by: chantra <chantra@…>
Acked-by: David Sommerseth <dazo@…>
Signed-off-by: David Sommerseth <dazo@…>

Note: See TracTickets for help on using tickets.