diff --git a/package/rpm/rpm.mk b/package/rpm/rpm.mk
index 9f42ee1..47c2ee9 100644
--- a/package/rpm/rpm.mk
+++ b/package/rpm/rpm.mk
@@ -17,6 +17,13 @@ RPM_CONF_OPT = --disable-build-versionscript --disable-rpath \
 	--with-libbeecrypt=$(STAGING_DIR) \
 	--with-popt=$(STAGING_DIR)
 
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+RPM_DEPENDENCIES += openssl
+RPM_CONF_OPT += --with-openssl=external
+else
+RPM_CONF_OPT += --with-openssl=no
+endif
+
 ifeq ($(BR2_PACKAGE_PCRE),y)
 RPM_DEPENDENCIES += pcre
 RPM_CONF_OPT += --with-pcre=external
