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