Rebuild ports statically linked to libcrypto(3)

Dominique Goncalves dominique.goncalves at
Thu Sep 7 12:42:58 PDT 2006

On 9/7/06, Dmitry Marakasov <amdmi3 at> wrote:
> * Dominique Goncalves (dominique.goncalves at wrote:
> > According to Security Advisories SA-06:19 about OpenSSL, we need to
> > rebuild ports which are statically linked to libcrypto(3).
> >
> > Is there a magic command to rebuild these ports ?
> No magic command, but this seems pretty reliable for me:
> for port in `pkg_info -oaq`; do
>         grep OPENSSL /usr/ports/$port/Makefile >/dev/null &&
>                 echo $port;
> done
> This will list all ports that use OPENSSL, and no need to search for
> executables/libs linked with libcrypto dynamically or statically.
> So you may consider this as `magic command', but I prefer to do such
> updates by hand, just to be sure everything is updated:
> for port in `pkg_info -oaq`; do
>         grep OPENSSL /usr/ports/$port/Makefile >/dev/null &&
>                 pkg_info -qO $port;
> done | xargs portupgrade -fr


> Note, that this will not only rebuild packages using OPENSSL, but also
> all package that depend on these. That catches double statical linking,
> i.e. libfoo.a is statically linked with libcrypto, and some other port
> is linked with libfoo.a statically, thus incluning openssl code.
> --
> Best regards,
>  Dmitry                          mailto:amdmi3 at

Thank you to all who answered,

There's this old saying: "Give a man a fish, feed him for a day. Teach
a man to fish, feed him for life."

More information about the freebsd-ports mailing list