pub mod display;
#[cfg(all(
feature = "keychain",
any(target_os = "macos", target_os = "windows", target_os = "linux")
))]
mod os_store;
pub mod recovery;
use std::io::Read;
use std::path::{Path, PathBuf};
use std::time::Duration;
use zeroize::Zeroizing;
pub use crate::crypto::SecretKind;
use crate::crypto::{KdfParams, SALT_LEN};
use crate::error::{MnemoError, Result};
use crate::format::{Header, PAGE_SIZE};
use crate::store::{Mnemo, MnemoConfig};
pub enum Secret {
Passphrase(Zeroizing<String>),
Key(Zeroizing<[u8; 32]>),
}
impl Secret {
pub fn kind(&self) -> SecretKind {
match self {
Secret::Passphrase(_) => SecretKind::Passphrase,
Secret::Key(_) => SecretKind::Key,
}
}
fn bytes(&self) -> &[u8] {
match self {
Secret::Passphrase(p) => p.as_bytes(),
Secret::Key(k) => &k[..],
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct FileKeyInfo {
pub salt: [u8; SALT_LEN],
pub kdf: KdfParams,
pub kind: SecretKind,
}
pub fn file_info(path: impl AsRef<Path>) -> Result<FileKeyInfo> {
let mut file = std::fs::File::open(path.as_ref())?;
let mut page = [0u8; PAGE_SIZE];
file.read_exact(&mut page)?;
let h = Header::from_page(&page)?;
let kdf = KdfParams {
m_cost: h.m_cost,
t_cost: h.t_cost,
p_cost: h.p_cost,
};
Ok(FileKeyInfo {
salt: h.salt,
kdf,
kind: if kdf.below_passphrase_floor() {
SecretKind::Key
} else {
SecretKind::Passphrase
},
})
}
pub fn hex(bytes: &[u8]) -> String {
bytes.iter().map(|b| format!("{b:02x}")).collect()
}
pub enum StoredSecret {
Key(Zeroizing<[u8; 32]>),
Passphrase(Zeroizing<String>),
}
impl StoredSecret {
pub fn encode(&self) -> Zeroizing<String> {
match self {
StoredSecret::Key(k) => Zeroizing::new(format!("key:{}", hex(&k[..]))),
StoredSecret::Passphrase(p) => Zeroizing::new(format!("passphrase:{}", p.as_str())),
}
}
pub fn decode(text: &str) -> Result<StoredSecret> {
if let Some(h) = text.strip_prefix("key:") {
return parse_hex_key(h)
.map(StoredSecret::Key)
.ok_or_else(|| MnemoError::Invalid("a key entry that isn't 64 hex digits".into()));
}
if let Some(p) = text.strip_prefix("passphrase:") {
return Ok(StoredSecret::Passphrase(Zeroizing::new(p.to_string())));
}
Err(MnemoError::Invalid(
"a key-store entry of an unknown type".into(),
))
}
fn same_as(&self, other: &StoredSecret) -> bool {
self.encode() == other.encode()
}
pub fn into_secret(self) -> Secret {
match self {
StoredSecret::Key(k) => Secret::Key(k),
StoredSecret::Passphrase(p) => Secret::Passphrase(p),
}
}
fn from_secret(s: &Secret) -> StoredSecret {
match s {
Secret::Key(k) => StoredSecret::Key(k.clone()),
Secret::Passphrase(p) => StoredSecret::Passphrase(p.clone()),
}
}
}
pub trait KeyStore {
fn describe(&self) -> String;
fn get(&self, salt: &[u8; SALT_LEN]) -> Result<Option<StoredSecret>>;
fn put(&self, salt: &[u8; SALT_LEN], secret: &StoredSecret, label: &str) -> Result<()>;
fn delete(&self, salt: &[u8; SALT_LEN]) -> Result<()>;
fn durable(&self) -> bool {
false
}
fn check_available(&self) -> Result<()> {
Ok(())
}
}
#[cfg(feature = "dev-hooks")]
#[doc(hidden)]
pub struct DirKeyStore {
dir: PathBuf,
}
#[cfg(feature = "dev-hooks")]
impl DirKeyStore {
pub fn new(dir: impl Into<PathBuf>) -> DirKeyStore {
DirKeyStore { dir: dir.into() }
}
fn entry(&self, salt: &[u8; SALT_LEN]) -> PathBuf {
self.dir.join(hex(salt))
}
}
#[cfg(feature = "dev-hooks")]
impl KeyStore for DirKeyStore {
fn describe(&self) -> String {
format!("the test key store at {}", self.dir.display())
}
fn get(&self, salt: &[u8; SALT_LEN]) -> Result<Option<StoredSecret>> {
match std::fs::read_to_string(self.entry(salt)) {
Ok(text) => StoredSecret::decode(Zeroizing::new(text).trim_end()).map(Some),
Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(None),
Err(e) => Err(MnemoError::Io(std::io::Error::other(format!(
"{} (reading): {e}",
self.describe()
)))),
}
}
fn put(&self, salt: &[u8; SALT_LEN], secret: &StoredSecret, _label: &str) -> Result<()> {
use std::io::Write;
let path = self.entry(salt);
let tmp = self.dir.join(format!("{}.tmp", hex(salt)));
let mut o = std::fs::OpenOptions::new();
o.write(true).create(true).truncate(true);
#[cfg(unix)]
std::os::unix::fs::OpenOptionsExt::mode(&mut o, 0o600);
let mut f = o.open(&tmp)?;
f.write_all(secret.encode().as_bytes())?;
f.sync_all()?;
std::fs::rename(&tmp, &path)?;
Ok(())
}
fn delete(&self, salt: &[u8; SALT_LEN]) -> Result<()> {
match std::fs::remove_file(self.entry(salt)) {
Err(e) if e.kind() != std::io::ErrorKind::NotFound => Err(e.into()),
_ => Ok(()),
}
}
fn durable(&self) -> bool {
std::env::var_os("MNEMO_DEV_KEYSTORE_NOT_DURABLE").is_none()
}
}
pub fn default_store() -> Option<Box<dyn KeyStore>> {
#[cfg(feature = "dev-hooks")]
{
if let Some(dir) = std::env::var_os("MNEMO_DEV_KEYSTORE").filter(|d| !d.is_empty()) {
return Some(Box::new(DirKeyStore::new(PathBuf::from(dir))));
}
if std::env::var_os("MNEMO_DEV_NO_KEYCHAIN").is_some() {
return None;
}
}
#[cfg(all(
feature = "keychain",
any(target_os = "macos", target_os = "windows", target_os = "linux")
))]
return Some(Box::new(os_store::OsKeyStore));
#[allow(unreachable_code)]
None
}
pub const KEYCHAIN_SERVICE: &str = "io.github.toarchkumar.mnemo.brain";
pub fn store_and_check(
store: &dyn KeyStore,
salt: &[u8; SALT_LEN],
secret: &StoredSecret,
label: &str,
) -> Result<()> {
store.put(salt, secret, label)?;
match store.get(salt) {
Ok(Some(back)) if back.same_as(secret) => Ok(()),
other => {
let _ = store.delete(salt);
Err(MnemoError::Invalid(format!(
"{} didn't give back the entry it was just given{}; nothing was changed",
store.describe(),
match other {
Err(e) => format!(" ({e})"),
_ => String::new(),
}
)))
}
}
}
fn parse_hex_key(h: &str) -> Option<Zeroizing<[u8; 32]>> {
let h = h.trim();
if h.len() != 64 || !h.bytes().all(|b| b.is_ascii_hexdigit()) {
return None;
}
let mut k = Zeroizing::new([0u8; 32]);
for (i, byte) in k.iter_mut().enumerate() {
*byte = u8::from_str_radix(&h[2 * i..2 * i + 2], 16).ok()?;
}
Some(k)
}
pub fn parse_key_text(text: &str, what: &str) -> Result<Zeroizing<[u8; 32]>> {
if let Some(k) = parse_hex_key(text) {
return Ok(k);
}
if recovery::looks_like_code(text) {
return recovery::parse(text).map_err(|e| MnemoError::Invalid(format!("{what}: {e}")));
}
Err(MnemoError::Invalid(format!(
"{what} holds neither 64 hex digits nor a recovery code"
)))
}
pub fn read_key_file(path: impl AsRef<Path>) -> Result<Zeroizing<[u8; 32]>> {
let path = path.as_ref();
let meta = std::fs::metadata(path).map_err(|e| {
MnemoError::Invalid(format!("reading the key file {}: {e}", path.display()))
})?;
if !meta.is_file() {
return Err(MnemoError::Invalid(format!(
"the key file {} isn't a regular file",
path.display()
)));
}
#[cfg(unix)]
{
use std::os::unix::fs::MetadataExt;
if meta.uid() != rustix::process::geteuid().as_raw() {
return Err(MnemoError::Invalid(format!(
"refusing the key file {}: another user owns it; give it to this user, then \
`chmod 600 {}`",
path.display(),
path.display()
)));
}
let mode = meta.mode() & 0o777;
if mode & 0o077 != 0 {
return Err(MnemoError::Invalid(format!(
"refusing the key file {}: group or others can read it (mode {mode:o}); run \
`chmod 600 {}`",
path.display(),
path.display()
)));
}
}
let bytes = Zeroizing::new(std::fs::read(path).map_err(|e| {
MnemoError::Invalid(format!("reading the key file {}: {e}", path.display()))
})?);
if bytes.len() == 32 {
let mut k = Zeroizing::new([0u8; 32]);
k.copy_from_slice(&bytes);
return Ok(k);
}
let text = Zeroizing::new(String::from_utf8_lossy(&bytes).into_owned());
if let Some(k) = parse_hex_key(&text) {
return Ok(k);
}
if recovery::looks_like_code(&text) {
return parse_key_text(&text, &format!("the key file {}", path.display()));
}
Err(MnemoError::Invalid(format!(
"{}: a key file holds 32 raw bytes, 64 hex digits or a recovery code",
path.display()
)))
}
pub fn write_new_key_file(path: impl AsRef<Path>, key: &[u8; 32]) -> Result<()> {
use std::io::Write;
let path = path.as_ref();
let mut o = std::fs::OpenOptions::new();
o.write(true).create_new(true);
#[cfg(unix)]
std::os::unix::fs::OpenOptionsExt::mode(&mut o, 0o600);
let mut f = o.open(path).map_err(|e| {
MnemoError::Invalid(format!("creating the key file {}: {e}", path.display()))
})?;
let text = Zeroizing::new(format!("{}\n", hex(key)));
f.write_all(text.as_bytes())?;
f.sync_all()?;
Ok(())
}
const COMMAND_OUTPUT_CAP: usize = 4096;
pub(crate) const SECRET_ENV_VARS: [&str; 4] = [
"MNEMO_PASSPHRASE",
"MNEMO_KEY",
"MNEMO_KEY_FILE",
"MNEMO_KEY_COMMAND",
];
pub fn run_key_command(cmd: &str, timeout: Duration) -> Result<Zeroizing<[u8; 32]>> {
use std::process::{Command, Stdio};
let argv = crate::embed_cmd::shlex_split(cmd)
.filter(|a| !a.is_empty())
.ok_or_else(|| MnemoError::Invalid("MNEMO_KEY_COMMAND is empty or badly quoted".into()))?;
let mut command = Command::new(&argv[0]);
for var in SECRET_ENV_VARS {
command.env_remove(var);
}
let mut child = command
.args(&argv[1..])
.stdin(Stdio::null())
.stdout(Stdio::piped())
.stderr(Stdio::inherit())
.spawn()
.map_err(|e| MnemoError::Invalid(format!("the key command didn't start: {e}")))?;
let mut out = child.stdout.take().expect("piped stdout");
let (tx, rx) = std::sync::mpsc::channel();
std::thread::spawn(move || {
let mut buf = Zeroizing::new(Vec::new());
let r = (&mut out)
.take(COMMAND_OUTPUT_CAP as u64 + 1)
.read_to_end(&mut buf);
let _ = tx.send((r, buf));
});
let start = std::time::Instant::now();
let fail = |child: &mut std::process::Child, msg: String| {
let _ = child.kill();
let _ = child.wait();
Err(MnemoError::Invalid(msg))
};
let buf = match rx.recv_timeout(timeout) {
Ok((Ok(_), buf)) => buf,
Ok((Err(e), _)) => {
return fail(&mut child, format!("reading the key command's output: {e}"))
}
Err(_) => {
return fail(
&mut child,
format!(
"the key command didn't answer within {} s",
timeout.as_secs()
),
)
}
};
if buf.len() > COMMAND_OUTPUT_CAP {
return fail(
&mut child,
"the key command printed more than 4 KiB".to_string(),
);
}
let status = loop {
match child.try_wait()? {
Some(s) => break s,
None if start.elapsed() >= timeout => {
return fail(
&mut child,
format!(
"the key command didn't answer within {} s",
timeout.as_secs()
),
)
}
None => std::thread::sleep(Duration::from_millis(10)),
}
};
if !status.success() {
return Err(MnemoError::Invalid(format!(
"the key command failed ({status})"
)));
}
let text = Zeroizing::new(String::from_utf8_lossy(&buf).into_owned());
let line = text.lines().next().unwrap_or("").trim();
if line.is_empty() {
return Err(MnemoError::Invalid(
"the key command printed nothing".into(),
));
}
parse_key_text(line, "the key command's output")
}
pub const CLI_COMMAND_TIMEOUT: Duration = Duration::from_secs(60);
pub const SERVER_COMMAND_TIMEOUT: Duration = Duration::from_secs(10);
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum Source {
EnvPassphrase,
EnvKey,
KeyFile(PathBuf),
KeyCommand,
Store(String),
}
impl std::fmt::Display for Source {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Source::EnvPassphrase => f.write_str("MNEMO_PASSPHRASE"),
Source::EnvKey => f.write_str("MNEMO_KEY"),
Source::KeyFile(p) => write!(f, "MNEMO_KEY_FILE ({})", p.display()),
Source::KeyCommand => f.write_str("MNEMO_KEY_COMMAND"),
Source::Store(s) => write!(f, "this brain's entry in {s}"),
}
}
}
pub struct Resolved {
pub secret: Secret,
pub source: Source,
pub next: Option<Source>,
pub notes: Vec<String>,
}
pub enum Resolution {
Found(Resolved),
NoSource {
kind: SecretKind,
notes: Vec<String>,
},
}
fn env_set(name: &str) -> Option<String> {
std::env::var(name).ok().filter(|v| !v.is_empty())
}
fn kind_word(k: SecretKind) -> &'static str {
match k {
SecretKind::Key => "a key",
SecretKind::Passphrase => "a passphrase",
}
}
pub fn resolve(
path: impl AsRef<Path>,
store: Option<&dyn KeyStore>,
command_timeout: Duration,
) -> Result<Resolution> {
let path = path.as_ref();
let file_name = path.display().to_string();
let mut notes = Vec::new();
let (kind, salts) = match file_info(path) {
Ok(i) => (Some(i.kind), vec![i.salt]),
Err(_) => match crate::store::wal_header_salts(path) {
Ok(c) if !c.is_empty() => {
notes.push(format!(
"{file_name}'s header couldn't be read; its write-ahead log names {} salt(s) \
to look up",
c.len()
));
(
Some(kind_of_kdf(c[0].1)),
c.iter().map(|(s, _)| *s).collect(),
)
}
_ => (None, Vec::new()),
},
};
let env = env_sources();
let Some(kind) = kind else {
let Some((src, _)) = env.first().cloned() else {
return Ok(Resolution::NoSource {
kind: SecretKind::Passphrase,
notes,
});
};
notes.push(format!(
"{file_name}'s header couldn't be read, so its kind of secret is unknown"
));
let secret = fetch(&src, None, command_timeout)?;
return Ok(Resolution::Found(Resolved {
secret,
source: src,
next: None,
notes,
}));
};
let mine: Vec<&(Source, SecretKind)> = env.iter().filter(|(_, k)| *k == kind).collect();
let other: Vec<&(Source, SecretKind)> = env.iter().filter(|(_, k)| *k != kind).collect();
let skipped = |notes: &mut Vec<String>, using: &Source| {
for (s, k) in &other {
notes.push(format!(
"{s} holds {}, but {file_name} uses {}; skipped it, using {using}",
kind_word(*k),
kind_word(kind)
));
}
};
if let Some(first) = mine.first() {
skipped(&mut notes, &first.0);
let secret = fetch(&first.0, None, command_timeout)?;
return Ok(Resolution::Found(Resolved {
secret,
source: first.0.clone(),
next: mine
.get(1)
.map(|(s, _)| s.clone())
.or_else(|| store.map(|st| Source::Store(st.describe()))),
notes,
}));
}
let looked = match store {
None => Ok(None),
Some(st) => match lookup_salts(st, &salts) {
Ok(e) => Ok(e.map(|e| (st.describe(), e))),
Err(_) if st.check_available().is_err() => Ok(None),
Err(e) => Err(e),
},
};
let (store_other, store_error) = match looked {
Ok(Some((desc, e))) if stored_kind(&e) == kind => {
let src = Source::Store(desc);
skipped(&mut notes, &src);
return Ok(Resolution::Found(Resolved {
secret: e.into_secret(),
source: src,
next: None,
notes,
}));
}
Ok(found) => (found, None),
Err(e) => (None, Some(e)),
};
if let Some(first) = other.first() {
if let (Some(e), Some(st)) = (&store_error, store) {
notes.push(format!("{} couldn't be read ({e})", st.describe()));
}
notes.push(format!(
"{file_name} uses {}, and no source of that kind is set; trying {} once",
kind_word(kind),
first.0
));
let secret = fetch(&first.0, None, command_timeout)?;
return Ok(Resolution::Found(Resolved {
secret,
source: first.0.clone(),
next: None,
notes,
}));
}
if let Some(e) = store_error {
return Err(e);
}
if let Some((desc, e)) = store_other {
let src = Source::Store(desc);
notes.push(format!(
"{file_name} uses {}, and no source of that kind is set; trying {src} once",
kind_word(kind)
));
return Ok(Resolution::Found(Resolved {
secret: e.into_secret(),
source: src,
next: None,
notes,
}));
}
Ok(Resolution::NoSource { kind, notes })
}
fn env_sources() -> Vec<(Source, SecretKind)> {
let mut present = Vec::new();
if env_set("MNEMO_PASSPHRASE").is_some() {
present.push((Source::EnvPassphrase, SecretKind::Passphrase));
}
if env_set("MNEMO_KEY").is_some() {
present.push((Source::EnvKey, SecretKind::Key));
}
if let Some(f) = env_set("MNEMO_KEY_FILE") {
present.push((Source::KeyFile(PathBuf::from(f)), SecretKind::Key));
}
if env_set("MNEMO_KEY_COMMAND").is_some() {
present.push((Source::KeyCommand, SecretKind::Key));
}
present
}
fn lookup_salts(store: &dyn KeyStore, salts: &[[u8; SALT_LEN]]) -> Result<Option<StoredSecret>> {
for salt in salts {
if let Some(e) = store.get(salt)? {
return Ok(Some(e));
}
}
Ok(None)
}
fn stored_kind(e: &StoredSecret) -> SecretKind {
match e {
StoredSecret::Key(_) => SecretKind::Key,
StoredSecret::Passphrase(_) => SecretKind::Passphrase,
}
}
fn kind_of_kdf(kdf: KdfParams) -> SecretKind {
if kdf.below_passphrase_floor() {
SecretKind::Key
} else {
SecretKind::Passphrase
}
}
fn fetch(src: &Source, entry: Option<StoredSecret>, timeout: Duration) -> Result<Secret> {
Ok(match src {
Source::EnvPassphrase => Secret::Passphrase(Zeroizing::new(
env_set("MNEMO_PASSPHRASE").unwrap_or_default(),
)),
Source::EnvKey => {
let text = Zeroizing::new(env_set("MNEMO_KEY").unwrap_or_default());
Secret::Key(parse_key_text(&text, "MNEMO_KEY")?)
}
Source::KeyFile(p) => Secret::Key(read_key_file(p)?),
Source::KeyCommand => {
let cmd = env_set("MNEMO_KEY_COMMAND").unwrap_or_default();
Secret::Key(run_key_command(&cmd, timeout)?)
}
Source::Store(_) => entry
.ok_or_else(|| MnemoError::Invalid("the key-store entry went away".into()))?
.into_secret(),
})
}
pub type Persist<'a> = dyn FnMut(&[u8; SALT_LEN], &[u8; 32]) -> Result<()> + 'a;
pub fn create_generated(
path: impl AsRef<Path>,
config: MnemoConfig,
prepare: &mut dyn FnMut(&mut Mnemo) -> Result<()>,
persist: &mut Persist<'_>,
) -> Result<Zeroizing<[u8; 32]>> {
let path = path.as_ref();
if std::fs::symlink_metadata(path).is_ok() {
return Err(MnemoError::Invalid(format!(
"{} already exists; nothing was changed",
path.display()
)));
}
crate::store::remove_dead_temps(path, "init");
let key = Zeroizing::new(Mnemo::generate_key());
let config = MnemoConfig {
kdf: KdfParams::raw_key(),
..config
};
let (tmp, mut db) =
crate::store::create_temp(path, "init", &key[..], SecretKind::Key, config, None)?;
let result = (|| {
prepare(&mut db)?;
let salt = db.header_salt();
db.close()?;
persist(&salt, &key)?;
#[cfg(feature = "dev-hooks")]
if std::env::var_os("MNEMO_DEV_ABORT_INIT_BEFORE_RENAME").is_some() {
std::process::abort();
}
if std::fs::symlink_metadata(path).is_ok() {
return Err(MnemoError::Invalid(format!(
"{} appeared while it was being created; nothing was changed there",
path.display()
)));
}
std::fs::rename(&tmp, path)?;
Ok(())
})();
match result {
Ok(()) => Ok(key),
Err(e) => {
let _ = std::fs::remove_file(&tmp);
Err(e)
}
}
}
#[derive(Debug)]
pub struct StoredRekeyError {
pub error: MnemoError,
pub entries: String,
pub new_secret_dropped: bool,
}
impl std::fmt::Display for StoredRekeyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}; {}", self.error, self.entries)
}
}
impl std::error::Error for StoredRekeyError {}
pub fn rekey_stored(
db: &mut Mnemo,
new: &Secret,
store: &dyn KeyStore,
label: &str,
before_commit: &mut dyn FnMut() -> Result<()>,
) -> std::result::Result<String, StoredRekeyError> {
let old_salt = db.header_salt();
let kdf = match new.kind() {
SecretKind::Key => KdfParams::raw_key(),
SecretKind::Passphrase => db.kdf_params().for_passphrase(),
};
let stored = StoredSecret::from_secret(new);
let mut new_salt: Option<[u8; SALT_LEN]> = None;
let r = db.rekey_staged(new.bytes(), new.kind(), kdf, &mut |salt| {
store_and_check(store, salt, &stored, label)?;
new_salt = Some(*salt);
before_commit()
});
match r {
Ok(()) => Ok(format!(
"the new secret is in {}; the old entry is still there, for copies of the file \
made before this rekey",
store.describe()
)),
Err(error) => {
let Some(ns) = new_salt else {
return Err(StoredRekeyError {
error,
entries: "the key store wasn't changed".into(),
new_secret_dropped: true,
});
};
if Mnemo::rekey_left_either_secret(&error) {
return Err(StoredRekeyError {
error,
entries: "both entries are kept, since the file may open with either \
secret"
.into(),
new_secret_dropped: false,
});
}
let (entries, new_secret_dropped) = match db.disk_salt() {
Ok(s) if s == old_salt => match store.delete(&ns) {
Ok(()) => (
"the old secret is still in force, and the new entry was removed"
.to_string(),
true,
),
Err(e) => (
format!(
"the old secret is still in force; removing the new entry failed ({e})"
),
true,
),
},
Ok(s) if s == ns => (
"the file may now open only with the new secret, so both entries are kept"
.to_string(),
false,
),
_ => (
"the file's header couldn't be read back, so both entries are kept".to_string(),
false,
),
};
Err(StoredRekeyError {
error,
entries,
new_secret_dropped,
})
}
}
}
pub fn kdf_grade_note(kdf: KdfParams, kind: SecretKind) -> Option<String> {
if kind == SecretKind::Passphrase && kdf.below_passphrase_floor() {
return Some(
"below the passphrase floor: a passphrase on raw-key KDF parameters; `mnemo rekey` \
or `mnemo compact` raises them"
.into(),
);
}
if kdf.is_test_grade() {
return Some("test-grade KDF parameters".into());
}
None
}