File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
pkgs/development/libraries/botan Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change 1717 with_esdm ? false ,
1818 # useful, but have to disable tests for now, as /dev/tpmrm0 is not accessible
1919 with_tpm2 ? false ,
20- # only allow BSI approved algorithms, FFI and SHAKE for XMSS
21- with_bsi_policy ? false ,
22- # only allow NIST approved algorithms
23- with_fips140_policy ? false ,
20+ policy ? null ,
2421} :
2522
26- assert ( ! with_bsi_policy && ! with_fips140_policy ) || ( with_bsi_policy != with_fips140_policy ) ;
23+ assert lib . assertOneOf "policy" policy [
24+ # no explicit policy is given. The defaults by the library are used
25+ null
26+ # only allow BSI approved algorithms, FFI and SHAKE for XMSS
27+ "bsi"
28+ # only allow NIST approved algorithms in FIPS 140
29+ "fips140"
30+ ] ;
2731
2832let
2933 common =
@@ -106,13 +110,12 @@ let
106110 ++ lib . optionals ( lib . versionAtLeast version "3.7.0" && with_esdm ) [
107111 "--enable-modules=esdm_rng"
108112 ]
109- ++ lib . optionals ( lib . versionAtLeast version "3.8.0" && with_bsi_policy ) [
110- "--module-policy=bsi"
113+ ++ lib . optionals ( lib . versionAtLeast version "3.8.0" && policy != null ) [
114+ "--module-policy=${ policy } "
115+ ]
116+ ++ lib . optionals ( lib . versionAtLeast version "3.8.0" && policy == "bsi" ) [
111117 "--enable-module=ffi"
112118 "--enable-module=shake"
113- ]
114- ++ lib . optionals ( lib . versionAtLeast version "3.8.0" && with_fips140_policy ) [
115- "--module-policy=fips140"
116119 ] ;
117120
118121 configurePhase = ''
You can’t perform that action at this time.
0 commit comments