     (testing "Keylength"
       (doseq [[message f expected]
               [["can be configured"
-                (partial initialize! ca-settings ssldir-contents "master" 512)
+                (partial initialize! ca-settings master-settings "master" 512)
                 512]
                ["has a default value"
-                (partial initialize! ca-settings ssldir-contents "master")
+                (partial initialize! ca-settings master-settings "master")
                 utils/default-key-length]]]
         (testing message
           (try

  (deftest initialize-master!-test
    (let [serial-number-file (temp-serial-number-file)]
      (try
        (initialize-master! ssldir-contents "master" "Puppet CA: localhost"
                            (utils/pem->private-key cakey)
                            (utils/pem->cert cacert)
                            512

                       :hostcert    (str ssldir "/certs/master.pem")
                       :localcacert (str ssldir "/certs/ca.pem")
                       :hostprivkey (str ssldir "/private_keys/master.pem")
                       :hostpubkey  (str ssldir "/public_keys/master.pem")
                       :dns-alt-names ""}
      ssldir-contents (settings->master-dir-paths master-settings)]

  (deftest initialize-ca!-test
