macOS
brew install asn1clocal Homebrew formula metadata
sudo port install asn1cMacPorts ports tree · lang/asn1c/Portfile · 来源: api.github.com
安装
brew install asn1clocal Homebrew formula metadata
sudo port install asn1cMacPorts ports tree · lang/asn1c/Portfile · 来源: api.github.com
nix profile install nixpkgs#asn1cnixpkgs package indexes · pkgs/by-name/as/asn1c/package.nix · 来源: api.github.com
sudo zypper install asn1copenSUSE Tumbleweed package metadata · asn1c · 来源: download.opensuse.org
概览
Compile ASN.1 specifications into C source code
历史
asn1c is Lev Walkin's ASN.1-to-C compiler, packaged as a command-line tool that turns ASN.1 module specifications into C and C++-compatible C code for BER, DER, OER, PER, XER, and related ASN.1 transfer syntaxes. Its upstream README frames it as a practical compiler for protocol implementers rather than a complete implementation of the entire ASN.1 standards family.
The project grew around the long-lived lionet.info ASN.1 compiler site and the vlm/asn1c source repository. The upstream documentation emphasizes code generation for native C structures, serializers, and deserializers, while the ChangeLog shows a 0.9 series active through at least the mid-2000s and 2010s with portability fixes, PER work, examples, OER support, and security fixes in generated code and tooling.
asn1c's history is closely tied to real protocol work. Official examples and ChangeLog entries mention X.509, LDAP, 3GPP RRC, MEGACO/H.248.1, GSM TAP3, LTE RRC, IEEE 1609.2, and SAE J2735, which explains why the package persists in Unix package managers despite ASN.1 being a niche compiler domain.
The Homebrew input records asn1c in several Unix package ecosystems, including Homebrew, Debian, MacPorts, Nix, Ubuntu, and zypper. That breadth matches the upstream portability work visible in the ChangeLog, including C89/C99, MinGW, macOS, autoreconf, and generated-file permission fixes.
The upstream README describes ASN.1 formats as widely used in HTTPS certificates, mobile-network control data, and intelligent transportation systems. For package users, asn1c tends to appear as a build-time or protocol-development dependency rather than an end-user application.
The core usage is `asn1c module.asn1`, with multiple ASN.1 modules passed together when specifications have interdependencies. By default, the compiler emits multiple `.c` and `.h` files for ASN.1 types; `-P` prints generated output, while `-E` and `-EF` expose parser and semantic-fixer stages for debugging a specification.
The generated C support code is used to encode and decode protocol data in BER/DER, OER, PER, and XER families. The bundled helper tools `enber` and `unber` support BER-oriented inspection workflows, and the `crfc2asn1.pl` script extracts ASN.1 modules from RFC text.
asn1c is one of those packages that matters because it sits at the boundary between formal telecom/security standards and C build systems. It is a small CLI in the package manager, but it can generate substantial source trees that become part of another project's ABI, memory-safety surface, and wire-format compatibility.
Package maintainers care about asn1c versions because changes in generated code, codec support, and skeleton behavior can affect downstream protocol parsers. The ChangeLog's security notes for generated output make it more than a compiler binary: upgrades can change the safety of code already emitted into dependent projects.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
asn1c | cli | 全局可执行文件 | |
crfc2asn1.pl | cli | 全局可执行文件 | |
enber | cli | 全局可执行文件 | |
unber | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:asn1c |
|---|---|
| 版本 | 0.9.29 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/asn1c |
| 主页 | https://lionet.info/asn1c/blog |
| 仓库 | https://github.com/vlm/asn1c |
| 上游文档 | https://github.com/vlm/asn1c#readme |
| 许可证 | BSD-2-Clause |
| 源码归档 | https://github.com/vlm/asn1c/archive/refs/tags/v0.9.29.tar.gz |
| 最后更新 | 2026-06-22T11:36:29Z |
| Pulse | updated |
| 构建依赖 | autoconf, automake, libtool |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | asn1c |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
asn1c 0.9.28+dfsg-5
ASN.1 compiler for C
sudo apt install asn1casn1c-doc 0.9.28+dfsg-5
Documentation for asn1c
sudo apt install asn1c-docasn1c
nix profile install nixpkgs#asn1casn1c 0.9.28+dfsg-5
ASN.1 compiler for C
sudo apt install asn1casn1c-doc 0.9.28+dfsg-5
Documentation for asn1c
sudo apt install asn1c-docasn1c 0.9.28-2.22
ASN.1 Compiler
sudo zypper install asn1casn1c
sudo port install asn1c来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.