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