]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Variable has renamed and documentation has changed
authorboggard <varyanik2@gmail.com>
Wed, 12 Jul 2017 18:01:56 +0000 (21:01 +0300)
committerboggard <varyanik2@gmail.com>
Wed, 12 Jul 2017 18:01:56 +0000 (21:01 +0300)
README.gost
gost_ameth.c

index d6d54648c29d33daf79b1a8a00d2b69befdeb897..74c5eb2f55991c667769539b074c2370a1584f67 100644 (file)
@@ -81,8 +81,10 @@ And section which describes configuration of the engine should contain
        default_algorithms = ALL
        CRYPT_PARAMS = id-Gost28147-89-CryptoPro-A-ParamSet
 
-If you want use unmask private key format, you must add:
-  PK_PARAMS = UNMASK
+BouncyCastle cryptoprovider has some problems with private key parsing from PrivateKeyInfo,
+so if you want to use old private key representation format, which supported by BC,
+you must add:
+  PK_PARAMS = LEGACY_PK_WRAP
 to [gost_section]
 
 Where engine_id parameter specifies name of engine (should be "gost").
index b2d6abacb2544132d9ee9132f332144445d9d298..437362c4b1fd0735e5bea33ddba49e31c9eb5231 100644 (file)
@@ -19,7 +19,7 @@
 #include "gost_lcl.h"
 #include "e_gost_err.h"
 
-#define PK_UNMASK_PARAM "UNMASK"
+#define PK_WRAP_PARAM "LEGACY_PK_WRAP"
 
 /*
  * Pack bignum into byte buffer of given size, filling all leading bytes by
@@ -443,7 +443,7 @@ static int priv_encode_gost(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk)
 
     /* unmasked private key */
     const char *pk_param = get_gost_engine_param(GOST_PARAM_PK_PARAMS);
-    if(pk_param != NULL && strcmp(pk_param, PK_UNMASK_PARAM) == 0) {
+    if(pk_param != NULL && strcmp(pk_param, PK_WRAP_PARAM) == 0) {
         ASN1_STRING *octet = NULL;
         int priv_len = 0;
         unsigned char *priv_buf = NULL;