Identical in function to https://github.com/open-quantum-safe/openssl/pull/354 and more general than https://github.com/open-quantum-safe/oqs-demos/issues/52. Low priority given unknown/low use of oqs-boringssl.