diff --git a/extra/simplesamlphp.spec b/extra/simplesamlphp.spec
index c95fde6025c7412164ad61556d59a42af86e6424..2ffbcafc80b99dd80c46d262ea969776d33b60e8 100644
--- a/extra/simplesamlphp.spec
+++ b/extra/simplesamlphp.spec
@@ -41,6 +41,7 @@ For further information, see the documentation at https://simplesamlphp.org/docs
 %install
 mkdir -p %{buildroot}%{_prefix}simplesamlphp/log
 mkdir -p %{buildroot}%{_prefix}simplesamlphp/data
+mkdir -p %{buildroot}%{_prefix}simplesamlphp/cert
 install -d %{buildroot}%{_prefix}
 
 tar cf - . | (cd %{buildroot}%{_prefix}simplesamlphp; tar xfp -)
@@ -92,3 +93,4 @@ tar cf - . | (cd %{buildroot}%{_prefix}simplesamlphp; tar xfp -)
 %config(noreplace) %attr(0640, root,apache) /var/lib/simplesamlphp/metadata/wsfed-sp-hosted.php
 %dir %attr(0770, root, apache) /var/lib/simplesamlphp/log
 %dir %attr(0770, root, apache) /var/lib/simplesamlphp/data
+%dir %attr(0750, root, apache) /var/lib/simplesamlphp/cert