How to install specific openssl version

I need to install a specific version of the openssl package: Openssl 1.1.1k. My .yaml is like this:

[...]
openssl:
plugin: make
source: https://www.openssl.org/source/openssl-1.1.1k.tar.gz
build-packages:
  - libssl-dev
  - g++
  - build-essential
override-build: |
  $SNAPCRAFT_PART_BUILD/config
  snapcraftctl build
  sudo ldconfig

example:
  plugin: make
  override-build: |
  $SNAPCRAFT_STAGE/usr/local/bin/openssl ecparam -name prime256v1 -genkey -noout -out key.pem
after: [openssl]
[...]

However, if I try to snapcraft this .yaml I get the following error:

/root/stage/usr/local/bin/openssl: symbol lookup error: /root/stage/usr/local/bin/openssl: undefined symbol: EVP_mdc2, version OPENSSL_1_1_0