fix!: Remove cryptographic builtins (#396)

Cryptographic builtins are removed due to various reasons like FIPS
compliance. Users needing crypto builtins are encouraged to use
extensions.

Deprecated functions are also removed.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2025-04-16 12:24:19 -07:00
committed by GitHub
parent 667cb0d90f
commit 9e43bd9878
17 changed files with 155 additions and 1070 deletions
-13
View File
@@ -646,8 +646,6 @@ impl Analyzer {
) -> Result<(Vec<SourceStr>, Vec<Ref<Expr>>)> {
let mut used_vars = vec![];
let mut comprs = vec![];
#[cfg(feature = "deprecated")]
let full_expr = expr;
traverse(expr, &mut |e| match e.as_ref() {
Var(v) if !matches!(v.0.text(), "_" | "input" | "data") => {
let name = v.0.source_str();
@@ -664,17 +662,6 @@ impl Analyzer {
first_use.entry(name).or_insert(v.0.clone());
}
} else if !scope.inputs.contains(&name) {
#[cfg(feature = "deprecated")]
{
if let Ok(path) = get_path_string(full_expr, None) {
if crate::builtins::BUILTINS.contains_key(path.as_str())
|| crate::builtins::deprecated::DEPRECATED
.contains_key(path.as_str())
{
return Ok(false);
}
}
}
bail!(v
.0
.error(format!("use of undefined variable `{name}` is unsafe").as_str()));