a1174d
diff --git a/third_party/openpgp.configure b/third_party/openpgp.configure
a1174d
--- a/third_party/openpgp.configure
a1174d
+++ b/third_party/openpgp.configure
a1174d
@@ -198,21 +198,27 @@
a1174d
         )
a1174d
         set_config("MZLA_BZIP2_CFLAGS", bzip2_flags.cflags)
a1174d
         set_config("MZLA_BZIP2_LIBS", bzip2_flags.ldflags)
a1174d
 
a1174d
     # librnp crypto backend selection
a1174d
+    @depends(target_is_linux)
a1174d
+    def librnp_backend_choices(is_linux):
a1174d
+        if is_linux:
a1174d
+            return ("botan", "openssl")
a1174d
+        else:
a1174d
+            return ("botan",)
a1174d
+
a1174d
     option("--with-librnp-backend",
a1174d
-           help="Build librnp with the selected backend: {botan, openssl}",
a1174d
+           help="Build librnp with the selected backend",
a1174d
+           choices=librnp_backend_choices,
a1174d
+           nargs=1,
a1174d
            default="botan")
a1174d
 
a1174d
     @depends("--with-librnp-backend")
a1174d
     def librnp_backend(backend):
a1174d
-        allowed = ("botan", "openssl")
a1174d
-        if backend[0] in allowed:
a1174d
+        if backend:
a1174d
             return backend[0]
a1174d
-        else:
a1174d
-            die(f"Unsupported librnp backend {backend[0]}.")
a1174d
 
a1174d
     set_config("MZLA_LIBRNP_BACKEND", librnp_backend)
a1174d
 
a1174d
     @depends(librnp_backend)
a1174d
     def rnp_botan(backend):
a1174d
@@ -273,10 +279,11 @@
a1174d
         set_config("MZLA_LIBRNP_OPENSSL_LIBS", openssl_flags.ldflags)
a1174d
 
a1174d
 
a1174d
         @depends(c_compiler, openssl_flags)
a1174d
         @imports(_from="textwrap", _import="dedent")
a1174d
+        @imports(_from="__builtin__", _import="chr")
a1174d
         def openssl_version(compiler, openssl_flags):
a1174d
             log.info("Checking for OpenSSL >= 1.1.1")
a1174d
             if openssl_flags is None:
a1174d
                 die("OpenSSL not found. Must be locatable with pkg-config or use --with-openssl.")
a1174d
 
a1174d