Hello,

Like most of you I imagine, I follow the LibreSSL port with interest.

I noticed a couple changes that could be automated with Coccinelle [1]
so I wrote some semantic patches here:

https://bitbucket.org/eliteraspberries/openssl-bis

in the branch named 'cocci'.

To apply a semantic patch, say 10-rm-malloc-return-casts.cocci,

    spatch --sp-file cocci/10-rm-malloc-return-casts.cocci \
        --dir /path/to/openssl

To apply all of them in order,

    ls -1 cocci | xargs -I {} -n 1 -- \
        spatch --dir /path/to/openssl --sp-file cocci/{}

For a big project like OpenSSL, semantic patching can save lots of time.
The patches generated are big and I haven't double-checked everything.
Please have a look and feel free to use what works.

Mansour

[1] http://coccinelle.lip6.fr/

Reply via email to