-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wiki needs more information on compiling custom ASN.1 modules #14
Comments
You need to provide all the required ASN.1 definitions to the compiler for your module to compile. |
Even when I include the file that exports the definitions I need manually with
-- File based on https://github.com/pycrate-org/pycrate/blob/9093d3875caf2adc7833724edfc71a2321909d74/pycrate_asn1dir/IETF_PKI_RFC5958/CryptographicMessageSyntaxAlgorithms-2009.asn
-- and https://github.com/pycrate-org/pycrate/blob/9093d3875caf2adc7833724edfc71a2321909d74/pycrate_asn1dir/IETF_PKI_RFC5958/AlgorithmInformation-2009.asn#L89
HelloX509 DEFINITIONS ::=
BEGIN
-- EXPORTS All
IMPORTS
ParamOptions, DIGEST-ALGORITHM, SIGNATURE-ALGORITHM,
PUBLIC-KEY, KEY-DERIVATION, KEY-WRAP, MAC-ALGORITHM,
KEY-AGREE, KEY-TRANSPORT, CONTENT-ENCRYPTION, ALGORITHM,
AlgorithmIdentifier
FROM AlgorithmInformation-2009 {
iso(1) identified-organization(3) dod(6) internet(1) security(5)
mechanisms(5) pkix(7) id-mod(0)
id-mod-algorithmInformation-02(58)}
id-null-with-null OBJECT IDENTIFIER ::= {iso(1) standard(0) 20248 digital-signature-methods(1) null-with-null(1)}
sa-null-with-null SIGNATURE-ALGORITHM ::= {
IDENTIFIER id-null-with-null
PARAMS ARE absent
}
END -- HelloX509 |
And to defuse any possible X-Y problem that might be here: my ultimate goal is to use pycrate as a library to serialize and deserialize CMS messages that have been encrypted with algorithms that have not been standardized yet; I'm only trying to start with the simplest possible "custom algorithm" as a test to make sure I've got the fundamentals of extending pycrate down first. |
OK, my recommendation would be to copy the entire
If it succeeds, your new value |
When I try exactly that, I get this error:
and (I tested, and I get this same error even if I don't delete the TXT files...) |
Maybe add a On my side, I get:
|
I'm trying to compile this very small ASN.1 definition as a test, which only declares a new and extremely boring signature algorithm:
However, when I try to use the compilation script with
-i
as the Wiki recommends, I get this error:Why isn't this import working?
The text was updated successfully, but these errors were encountered: