Skip to content

error: conflicting types for ‘SSL_SESSION_get_master_key #304

@keefer223

Description

@keefer223

I'm using Debian 11, python 3.9 and I just updated everything.

sudo apt-get update -y && sudo apt-get upgrade -y

sudo apt-get install -y git unzip build-essential libssl-dev libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libgmp-dev libevent-dev autogen automake libtool libcurl4-openssl-dev

git clone https://github.com/carsenk/denarius

cd denarius

git checkout master

git pull

cd src

make -f makefile.unix

make -f makefile.unix error-ed out with the following: (this is just a partial list)

In file included from tor/tortls.c:52:
tor/tortls.h:140:15: error: conflicting types for ‘SSL_SESSION_get_master_key’
140 | STATIC size_t SSL_SESSION_get_master_key(SSL_SESSION *s, uint8_t *out,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tor/tortls.c:40:
/usr/include/openssl/ssl.h:2007:15: note: previous declaration of ‘SSL_SESSION_get_master_key’ was here
2007 | __owur size_t SSL_SESSION_get_master_key(const SSL_SESSION *sess,

tor/tortls.c: In function ‘tor_tls_client_is_using_v2_ciphers’:
tor/tortls.c:1511:20: error: invalid use of incomplete typedef ‘SSL_SESSION’ {aka ‘struct ssl_session_st’}
1511 | ciphers = session->ciphers;
| ^~
tor/tortls.c: At top level:
tor/tortls.c:2405:1: error: conflicting types for ‘SSL_get_client_random’
2405 | SSL_get_client_random(SSL *s, uint8_t *out, size_t len)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from tor/tortls.c:40:
/usr/include/openssl/ssl.h:2003:15: note: previous declaration of ‘SSL_get_client_random’ was here
2003 | __owur size_t SSL_get_client_random(const SSL *ssl, unsigned char *out,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from tor/tortls.c:27:
tor/tortls.c: In function ‘SSL_get_client_random’:
tor/tortls.c:2410:15: error: invalid use of incomplete typedef ‘SSL’ {aka ‘struct ssl_st’}
2410 | tor_assert(s->s3);
| ^~

tor/tortls.c:2424:16: error: invalid use of incomplete typedef ‘SSL’ {aka ‘struct ssl_st’}
2424 | memcpy(out, s->s3->server_random, len);
| ^~
tor/tortls.c: In function ‘SSL_SESSION_get_master_key’:
tor/tortls.c:2435:13: error: invalid use of incomplete typedef ‘SSL_SESSION’ {aka ‘struct ssl_session_st’}
2435 | return s->master_key_length;
| ^~
In file included from tor/tortls.c:27:
tor/tortls.c:2436:30: error: invalid use of incomplete typedef ‘SSL_SESSION’ {aka ‘struct ssl_session_st’}
2436 | tor_assert(len == (size_t)s->master_key_length);
| ^~
tor/torcompat.h:196:51: note: in definition of macro ‘PREDICT_UNLIKELY’
196 | #define PREDICT_UNLIKELY(exp) __builtin_expect(!!(exp), 0)
| ^~~
tor/tortls.c:2436:3: note: in expansion of macro ‘tor_assert’
2436 | tor_assert(len == (size_t)s->master_key_length);
| ^~~~~~~~~~
tor/tortls.c:2438:16: error: invalid use of incomplete typedef ‘SSL_SESSION’ {aka ‘struct ssl_session_st’}
2438 | memcpy(out, s->master_key, len);
| ^~
make: *** [makefile.unix:465: obj/tortls.o] Error 1

It appears that the majority of the issues is syntac.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions