MCPcopy Index your code
hub / github.com/secdev/scapy / RSAPrivateKey_OpenSSL

Class RSAPrivateKey_OpenSSL

scapy/layers/x509.py:1032–1049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1030# this lazy implementation actually supports RSA encoding only.
1031# We'd rather call it RSAPrivateKey_OpenSSL than X509_PrivateKeyInfo.
1032class RSAPrivateKey_OpenSSL(ASN1_Packet):
1033 ASN1_codec = ASN1_Codecs.BER
1034 ASN1_root = ASN1F_SEQUENCE(
1035 ASN1F_enum_INTEGER("version", 0, ["v1", "v2"]),
1036 ASN1F_PACKET("privateKeyAlgorithm",
1037 X509_AlgorithmIdentifier(),
1038 X509_AlgorithmIdentifier),
1039 ASN1F_PACKET("privateKey",
1040 RSAPrivateKey(),
1041 RSAPrivateKey,
1042 explicit_tag=0x04),
1043 ASN1F_optional(
1044 ASN1F_PACKET("parameters", None, ECParameters,
1045 explicit_tag=0xa0)),
1046 ASN1F_optional(
1047 ASN1F_PACKET("publicKey", None,
1048 ECDSAPublicKey,
1049 explicit_tag=0xa1)))
1050
1051# We need this hack because ECParameters parsing below must return
1052# a Padding payload, and making the ASN1_Packet class have Padding

Callers 1

__call__Method · 0.90

Calls 6

ASN1F_SEQUENCEClass · 0.90
ASN1F_enum_INTEGERClass · 0.90
ASN1F_PACKETClass · 0.90
ASN1F_optionalClass · 0.90
RSAPrivateKeyClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…