diff --git a/contrib/smime_keys b/contrib/smime_keys
index 08e5cde71..f33066f70 100755
--- a/contrib/smime_keys
+++ b/contrib/smime_keys
@@ -77,7 +77,7 @@ sub handle_add_root_cert ($);
 
 
 my $neomutt = $ENV{MUTT_CMDLINE} || 'neomutt';
-my $opensslbin = "/usr/bin/openssl";
+my $opensslbin = "@TERMUX_PREFIX@/bin/openssl";
 my $tmpdir;
 
 # Get the directories neomutt uses for certificate/key storage.
