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@debuntu.org>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
| ... | ... |
@@ -962,10 +962,10 @@ verify_callback (int preverify_ok, X509_STORE_CTX * ctx) |
| 962 | 962 |
goto end; |
| 963 | 963 |
} |
| 964 | 964 |
|
| 965 |
- n = sk_num(X509_CRL_get_REVOKED(crl)); |
|
| 965 |
+ n = sk_X509_REVOKED_num(X509_CRL_get_REVOKED(crl)); |
|
| 966 | 966 |
|
| 967 | 967 |
for (i = 0; i < n; i++) {
|
| 968 |
- revoked = (X509_REVOKED *)sk_value(X509_CRL_get_REVOKED(crl), i); |
|
| 968 |
+ revoked = (X509_REVOKED *)sk_X509_REVOKED_value(X509_CRL_get_REVOKED(crl), i); |
|
| 969 | 969 |
if (ASN1_INTEGER_cmp(revoked->serialNumber, X509_get_serialNumber(ctx->current_cert)) == 0) {
|
| 970 | 970 |
msg (D_HANDSHAKE, "CRL CHECK FAILED: %s is REVOKED",subject); |
| 971 | 971 |
goto end; |
| ... | ... |
@@ -1584,7 +1584,7 @@ init_ssl (const struct options *options) |
| 1584 | 1584 |
/* Set Certificate Verification chain */ |
| 1585 | 1585 |
if (!options->ca_file) |
| 1586 | 1586 |
{
|
| 1587 |
- if (ca && sk_num(ca)) |
|
| 1587 |
+ if (ca && sk_X509_num(ca)) |
|
| 1588 | 1588 |
{
|
| 1589 | 1589 |
for (i = 0; i < sk_X509_num(ca); i++) |
| 1590 | 1590 |
{
|