diff --git a/buildout/software-profiles/m2crypto.cfg b/buildout/software-profiles/m2crypto.cfg
index efeff2fd1aae81eea207e06a197f45101404fe69..28c732f11e06aef4021420586359c88090cb1c40 100644
--- a/buildout/software-profiles/m2crypto.cfg
+++ b/buildout/software-profiles/m2crypto.cfg
@@ -3,6 +3,7 @@
 
 [buildout]
 extends =
+  openssl.cfg
   swig.cfg
 parts =
   M2Crypto
@@ -11,6 +12,12 @@ parts =
 recipe = zc.recipe.egg:custom
 egg = M2Crypto
 environment = M2Crypto-env
+rpath =
+  ${openssl:location}/lib/
+include-dirs =
+  ${openssl:location}/include
+library-dirs =
+  ${openssl:location}/lib
 
 [M2Crypto-env]
 PATH = ${swig:location}/bin:%(PATH)s