From: Victor Wagner Date: Fri, 18 Sep 2015 08:21:50 +0000 (+0300) Subject: Added 'fake' OIDs for oid-less objects. Unfortunately, it seems to be impossible... X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=a367f52fa52a5b792f961c2f651d205ec25b1e27;p=openssl-gost%2Fengine.git Added 'fake' OIDs for oid-less objects. Unfortunately, it seems to be impossible to add oid-less object to object datahbase at the runtime. Removed extra copy operation from gost_add_obj --- diff --git a/gost_obj.txt b/gost_obj.txt index b33ae03..0e5e41b 100644 --- a/gost_obj.txt +++ b/gost_obj.txt @@ -15,12 +15,12 @@ 1.2.643.7.1.2.1.2.2: id-tc26-gost-3410-2012-512-paramSetB: GOST R 34.10-2012 (512 bit) ParamSet B 1.2.643.7.1.2.5.1.1:id-tc26-gost-28147-param-Z : GOST 28147-89 TC26 parameter set # Additional GOST 28147-89 cipher modes -:gost89-cbc: -:gost89-ecb: -:gost89-ofb: -:gost89-cnt: -:gost89-cnt-12: -:gost-mac-12: +1.2.643.2.2.21.2:gost89-cbc: +1.2.643.2.2.21.3:gost89-ecb: +1.2.643.2.2.21.4:gost89-ofb: +1.2.643.2.2.21.5:gost89-cnt: +1.2.643.2.2.21.6:gost89-cnt-12: +1.2.643.2.2.22.2:gost-mac-12: # Russia-specific DN fields and X.509v3 extensions 1.2.643.3.131.1.1:INN:Individual Fiscal Number 1.2.643.100.1:OGRN:Main state registration number diff --git a/obj_create.c b/obj_create.c index c1c039c..1f80238 100644 --- a/obj_create.c +++ b/obj_create.c @@ -5,8 +5,6 @@ int gost_add_obj(const char *oid, const char *sn, const char *ln) { int nid; - char *oidtemp=NULL,*sntemp=NULL,*lntemp=NULL; - if (oid) { nid = OBJ_txt2nid(oid); } else { @@ -15,20 +13,6 @@ int gost_add_obj(const char *oid, const char *sn, const char *ln) if (nid != NID_undef) { return nid; } - if (oid) { - oidtemp=OPENSSL_malloc(strlen(oid) + 2); - strcpy(oidtemp, oid); - } - - if (sn) { - sntemp=OPENSSL_malloc(strlen(sn) + 2); - strcpy(sntemp, sn); - } - - if (ln) { - lntemp=OPENSSL_malloc(strlen(ln) + 2); - strcpy(lntemp, ln); - } return OBJ_create(oid,sn,ln); }