[gcr: 3/5] egg: add attributes for GOST certificates



commit b9df4fcf2a81f38833e61d2f2160bd452200b979
Author: Dmitry Baryshkov <dbaryshkov gmail com>
Date:   Wed Jan 29 20:28:09 2020 +0300

    egg: add attributes for GOST certificates
    
    Add several DN entries found in qualified GOST certificates. These items
    are described in draft-deremin-rfc4491-bis.
    
    Signed-off-by: Dmitry Baryshkov <dbaryshkov gmail com>

 egg/egg-oid.c  |  9 +++++++++
 egg/pkix.asn   | 18 ++++++++++++++++++
 egg/pkix.asn.h | 36 +++++++++++++++++++++++++++++++++++-
 3 files changed, 62 insertions(+), 1 deletion(-)
---
diff --git a/egg/egg-oid.c b/egg/egg-oid.c
index d0e7207..126aa12 100644
--- a/egg/egg-oid.c
+++ b/egg/egg-oid.c
@@ -94,6 +94,15 @@ static OidInfo oid_info[] = {
        { 0, "2.5.4.65", "pseudonym", N_("Pseudonym"),
                EGG_OID_PRINTABLE | EGG_OID_IS_CHOICE },
 
+       { 0, "1.2.643.100.1", "OGRN", N_("OGRN"),
+               EGG_OID_PRINTABLE },
+       { 0, "1.2.643.100.3", "SNILS", N_("SNILS"),
+               EGG_OID_PRINTABLE },
+       { 0, "1.2.643.100.5", "OGRNIP", N_("OGRNIP"),
+               EGG_OID_PRINTABLE },
+       { 0, "1.2.643.3.131.1.1", "INN", N_("INN"),
+               EGG_OID_PRINTABLE },
+
        { 0, "1.2.840.113549.1.1.1", "rsaEncryption", N_("RSA"), 0 },
        { 0, "1.2.840.113549.1.1.2", "md2WithRSAEncryption", N_("MD2 with RSA"), 0 },
        { 0, "1.2.840.113549.1.1.4", "md5WithRSAEncryption", N_("MD5 with RSA"), 0 },
diff --git a/egg/pkix.asn b/egg/pkix.asn
index 5696328..e5822c4 100644
--- a/egg/pkix.asn
+++ b/egg/pkix.asn
@@ -1334,4 +1334,22 @@ SignedPublicKeyAndChallenge ::= SEQUENCE {
 
 ExtensionRequest ::= SEQUENCE OF Extension
 
+
+-- Russian qualified certificate entries
+id-ogrn OBJECT IDENTIFIER ::=
+          {iso(1) member-body(2) ru(643) 100 1}
+OGRN ::= NumericString (SIZE (13))
+
+id-snils OBJECT IDENTIFIER ::=
+          {iso(1) member-body(2) ru(643) 100 3}
+SNILS ::= NumericString (SIZE (11))
+
+id-ogrn OBJECT IDENTIFIER ::=
+          {iso(1) member-body(2) ru(643) 100 5}
+OGRNIP ::= NumericString (SIZE (15))
+
+id-inn OBJECT IDENTIFIER ::=
+          {iso(1) member-body(2) ru(643) reg3(3) fns(131) 1 inn(1)}
+INN ::= NumericString (SIZE (12))
+
 END
diff --git a/egg/pkix.asn.h b/egg/pkix.asn.h
index 3023204..66bdfbb 100644
--- a/egg/pkix.asn.h
+++ b/egg/pkix.asn.h
@@ -1266,7 +1266,41 @@ const asn1_static_node pkix_asn1_tab[] = {
   { "publicKeyAndChallenge", 1073741826, "PublicKeyAndChallenge"},
   { "signatureAlgorithm", 1073741826, "AlgorithmIdentifier"},
   { "signature", 6, NULL },
-  { "ExtensionRequest", 536870923, NULL },
+  { "ExtensionRequest", 1610612747, NULL },
   { NULL, 2, "Extension"},
+  { "id-ogrn", 1879048204, NULL },
+  { "iso", 1073741825, "1"},
+  { "member-body", 1073741825, "2"},
+  { "ru", 1073741825, "643"},
+  { NULL, 1073741825, "100"},
+  { NULL, 1, "1"},
+  { "OGRN", 1612709916, NULL },
+  { NULL, 1048586, "13"},
+  { "id-snils", 1879048204, NULL },
+  { "iso", 1073741825, "1"},
+  { "member-body", 1073741825, "2"},
+  { "ru", 1073741825, "643"},
+  { NULL, 1073741825, "100"},
+  { NULL, 1, "3"},
+  { "SNILS", 1612709916, NULL },
+  { NULL, 1048586, "11"},
+  { "id-ogrn", 1879048204, NULL },
+  { "iso", 1073741825, "1"},
+  { "member-body", 1073741825, "2"},
+  { "ru", 1073741825, "643"},
+  { NULL, 1073741825, "100"},
+  { NULL, 1, "5"},
+  { "OGRNIP", 1612709916, NULL },
+  { NULL, 1048586, "15"},
+  { "id-inn", 1879048204, NULL },
+  { "iso", 1073741825, "1"},
+  { "member-body", 1073741825, "2"},
+  { "ru", 1073741825, "643"},
+  { "reg3", 1073741825, "3"},
+  { "fns", 1073741825, "131"},
+  { NULL, 1073741825, "1"},
+  { "inn", 1, "1"},
+  { "INN", 538968092, NULL },
+  { NULL, 1048586, "12"},
   { NULL, 0, NULL }
 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]