lsquic: handshake: handshake: error:00000001:invalid library (0):OPENSSL_internal:unknown library
Hi, I know this is so dummy question and I am sure it’s my fault but I can’t manage to solve it. I am trying to write simple client and server. Client will send message and server will print it out. My problem is that I cannot perform handshake and I can’t get why.
The client log output is
michal@michal-Latitude-E5450:~/Repos/mt/lsquic-demo$ ./client
Logger initialized
13:47:42.119 [DEBUG] tokgen: TOKGEN2 does not exist: generate
13:47:42.119 [INFO] tokgen: inserted TOKGEN2 of size 110
13:47:42.119 [DEBUG] tokgen: initialized
13:47:42.119 [INFO] engine: instantiated engine
13:47:42.119 [DEBUG] engine: grew heaps to 4 elements
13:47:42.119 [DEBUG] conn: generated and assigned SCID 03D6EB9FCDF5BFD1
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] bw-sampler: init
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] bbr: initialized
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] cubic: lsquic_cubic_init(cubic, $conn)
13:47:42.119 [INFO] [QUIC:03D6EB9FCDF5BFD1] cubic: initialized
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] adaptive-cc: initialized
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] cfcw: recv_off changed: read_off: 0; recv_off: 15728640
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: created client, DCID: D6C808483EFC4A171C864BFD17DDCAF009
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: Create new SSL_CTX
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: generated transport parameters buffer of 55 bytes
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: max_idle_timeout: 30000; init_max_data: 15728640; init_max_stream_data_bidi_local: 6291456; init_max_stream_data_bidi_remote: 0; init_max_stream_data_uni: 32768; init_max_streams_bidi: 100; init_max_streams_uni: 100; ack_delay_exponent: 3; max_ack_delay: 25; active_connection_id_limit: 8; timestamps: 2; loss_bits: 1; initial_source_connection_id: 03D6EB9FCDF5BFD1
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1-18446744073709551615] di: initialized
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1-18446744073709551615] sfcw: recv_off changed: read_off: 0; recv_off: 16384
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1-18446744073709551615] stream: created crypto stream
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1-18446744073709551615] stream: calling on_new_stream
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] sendctl: send_ctl_can_send: n_out: 0 (unacked_all: 0); cwnd: 46720
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] pacer: lsquic_pacer_can_schedule: 1
13:47:42.119 [DEBUG] engine: incref conn 03D6EB9FCDF5BFD1, '' -> 'T'
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: handshake stream created successfully
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] conn: negotiating version FF000020
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] conn: logging using client SCID
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] event: connection created
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] qlog: [10569977527,"CONNECTIVITY","NEW_CONNECTION","LINE",{"ip_version":"4","srcip":"127.0.0.1","dstip":"127.0.0.1","srcport":"6555","dstport":"7777"}]
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] event: version negotiation: proposed version FF000020
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] qlog: [10569977539,"CONNECTIVITY","VERNEG","LINE",{"proposed_version":"FF000020"}]
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] conn: record path 0: (127.0.0.1:6555 - 127.0.0.1:7777)
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] conn: spin bit enabled on path 0
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] conn: record new path ID 0
On new connection
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] conn: delayed stream creation. Backlog size: 1
13:47:42.119 [DEBUG] engine: decref conn 03D6EB9FCDF5BFD1, 'HT' -> 'H'
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] pacer: lsquic_pacer_can_schedule: 1
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] sendctl: pacer blocked: 0, in_flight_all: 0
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: handshake: error:00000001:invalid library (0):OPENSSL_internal:unknown library
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: handshake failed
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] conn: handshake failed
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: enc level clear after on_write: stop
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: Exit shake_stream
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] sendctl: app-limited
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] conn: sit-0 streams: max count: 0; created streams: 0
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] conn: created 0 delayed streams
13:47:42.119 [DEBUG] engine: incref conn 03D6EB9FCDF5BFD1, 'H' -> 'CH'
13:47:42.119 [DEBUG] engine: decref conn 03D6EB9FCDF5BFD1, 'CH' -> 'C'
13:47:42.119 [DEBUG] engine: decref conn 03D6EB9FCDF5BFD1, 'C' -> ''
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: crypto stream level 0 is closed
13:47:42.119 [DEBUG] [QUIC:03D6EB9FCDF5BFD1-18446744073709551615] sfcw: read_off goes from 0 to 0
13:47:42.120 [DEBUG] [QUIC:03D6EB9FCDF5BFD1-18446744073709551615] stream: destroyed stream
13:47:42.120 [DEBUG] [QUIC:03D6EB9FCDF5BFD1-18446744073709551615] stream: history: [CN320L]
13:47:42.120 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] pacer: scheduled calls: 0
13:47:42.120 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] bw-sampler: cleanup
13:47:42.120 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] bbr: cleanup
13:47:42.120 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] adaptive-cc: cleanup
13:47:42.120 [NOTICE] [QUIC:03D6EB9FCDF5BFD1] sendctl: stats: n_total_sent: 0; n_resent: 0; n_delayed: 0
On connection close
errbuf:
conn status: LSCONN_ST_HSK_FAILURE
13:47:42.120 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] handshake: iquic_esfi_destroy
13:47:42.120 [DEBUG] [QUIC:03D6EB9FCDF5BFD1] event: full connection destroyed
What I am worried about is handshake: handshake: error:00000001:invalid library (0):OPENSSL_internal:unknown library. I am not sure if I am linking library in a proper way. I have also tried to init ssl library with CRYPTO_library_init or OPENSSL_library_init or something similar but it doesn’t help. Also AFAIK this is not needed or at least it should be needed in my case.
Logs from server are:
Logger initialized
13:47:32.389 [DEBUG] tokgen: TOKGEN2 does not exist: generate
13:47:32.389 [INFO] tokgen: inserted TOKGEN2 of size 110
13:47:32.389 [DEBUG] tokgen: initialized
13:47:32.389 [DEBUG] handshake: generated QUIC server context of 38 bytes for version FF00001B
13:47:32.389 [DEBUG] handshake: max_idle_timeout: 30000; init_max_data: 1572864; init_max_stream_data_bidi_local: 0; init_max_stream_data_bidi_remote: 1048576; init_max_stream_data_uni: 12288; init_max_streams_bidi: 100; init_max_streams_uni: 3; active_connection_id_limit: 8; timestamps: 2
13:47:32.389 [DEBUG] handshake: generated QUIC server context of 38 bytes for version FF00001C
13:47:32.389 [DEBUG] handshake: max_idle_timeout: 30000; init_max_data: 1572864; init_max_stream_data_bidi_local: 0; init_max_stream_data_bidi_remote: 1048576; init_max_stream_data_uni: 12288; init_max_streams_bidi: 100; init_max_streams_uni: 3; active_connection_id_limit: 8; timestamps: 2
13:47:32.389 [INFO] prq: initialized queue of size 10000
13:47:32.389 [INFO] purga: create purgatory, min life 30000000 usec
13:47:32.389 [INFO] engine: instantiated engine
It looks like it doesn’t event receive anything.
My code is available here https://github.com/qssh-mt/lsquic-demo
I know it isn’t complete but I just wanted to test handshake. After this I will try to implement the rest.
I would be so grateful if you could look at it.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
You should not need to use
ea_alpnif you are using the engine in HTTP mode, so I presume that you are not. There are two clients in the distribution that setea_alpn(and work, to the best of my knowledge): echo_client.c and md5_client.c. My advise would be to see how they are implemented and model your own client on them.Thanks a lot I will check it out. Just wanted to make sure it’s my fault. Btw. your tutorial and slides look awesome