NAME
Alien::ngtcp2 - Find or build the native libraries needed for QUIC
SYNOPSIS
use Alien::ngtcp2;
my $cflags = Alien::ngtcp2->cflags;
my $libs = Alien::ngtcp2->libs;
my $crypto_cflags = Alien::ngtcp2->crypto_cflags;
my $crypto_libs = Alien::ngtcp2->crypto_libs;
DESCRIPTION
Alien::ngtcp2 supplies the native ngtcp2 libraries needed by Perl QUIC distributions.
QUIC needs two native pieces:
libngtcp2, which handles the QUIC protocola TLS helper, which connects ngtcp2 to TLS 1.3
Alien::ngtcp2 uses Picotls for the TLS helper. Picotls is small, designed for TLS 1.3, and works well with QUIC.
OpenSSL is used underneath Picotls for cryptography and X.509 certificate handling. OpenSSL is not used as the QUIC TLS implementation.
HOW INSTALLATION WORKS
Alien::ngtcp2 builds a tested pair:
ngtcp2 1.25.0
Picotls commit f07f1c8c68b237f1468bc1f1fe1b68aba3ff23b4
The pair is built together instead of reusing an arbitrary system libngtcp2_crypto_picotls. The system helper does not record which Picotls revision it was built against.
On Unix-like systems, a system OpenSSL 1.1.1 or newer is used when available. If no suitable OpenSSL development installation is available, Alien::OpenSSL can provide one.
Windows
On Windows, Alien::ngtcp2 uses the OpenSSL that belongs to the active Perl and compiler toolchain.
If that OpenSSL is older than 1.1.1, installation stops with a clear error. Alien::ngtcp2 does not silently install a second TLS stack on Windows.
Historical Strawberry Perl 5.28 contains OpenSSL 1.1.0j and is therefore too old. Strawberry Perl 5.30 and newer meet the required baseline.
METHODS
cflags
Returns compiler flags for the core libngtcp2 library.
libs
Returns linker flags for the core libngtcp2 library.
crypto_backend
Returns picotls.
This method remains available so downstream distributions written for Alien::ngtcp2 0.02 do not need an API change.
crypto_package
Returns libngtcp2_crypto_picotls.
crypto_cflags
Returns the compiler flags needed to use the ngtcp2 Picotls helper.
crypto_libs
Returns the linker flags needed to use the ngtcp2 Picotls helper.
VERSIONS
Alien::ngtcp2 requires Perl 5.20 or newer and Alien::Build 2.84 or newer.
The bundled ngtcp2 source is version 1.25.0.
BUNDLED PICOTLS SOURCE
Alien::ngtcp2 contains the MIT-licensed Picotls TLS core and OpenSSL binding from commit:
f07f1c8c68b237f1468bc1f1fe1b68aba3ff23b4
This is the Picotls revision documented by ngtcp2 1.25.0.
The Picotls minicrypto backend and its third-party dependencies are not included.
SEE ALSO
https://github.com/ngtcp2/ngtcp2
https://github.com/h2o/picotls
AUTHOR
Joshua S. Day
COPYRIGHT AND LICENSE
This software is Copyright (c) 2026 by Joshua S. Day.
This is free software, licensed under:
The MIT (X11) License