mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
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:
committed by
GitHub
parent
667cb0d90f
commit
9e43bd9878
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user