List Info

Thread: OpenSSL: openssl/engines/ccgost/ e_gost_err.c e_gost_err.h gost2...




OpenSSL: openssl/engines/ccgost/ e_gost_err.c e_gost_err.h gost2...
country flaguser name
Germany
2008-02-28 07:45:07
  OpenSSL CVS Repository
  http://cvs.openssl.org/
 
____________________________________________________________
________________

  Server: cvs.openssl.org                  Name:   Dr.
Stephen Henson
  Root:   /v/openssl/cvs                   Email:  steveopenssl.org
  Module: openssl                          Date:  
28-Feb-2008 14:45:07
  Branch: HEAD                             Handle:
2008022813450501

  Modified files:
    openssl/engines/ccgost  e_gost_err.c e_gost_err.h
gost2001.c
                            gost2001_keyx.c gost94_keyx.c
gost_ameth.c
                            gost_pmeth.c gost_sign.c

  Log:
    Fix error code function name mismatches in GOST engine,
rebuild
    errors.

  Summary:
    Revision    Changes     Path
    1.7         +13 -29    
openssl/engines/ccgost/e_gost_err.c
    1.7         +69 -85    
openssl/engines/ccgost/e_gost_err.h
    1.3         +2  -2     
openssl/engines/ccgost/gost2001.c
    1.6         +6  -6     
openssl/engines/ccgost/gost2001_keyx.c
    1.5         +1  -1     
openssl/engines/ccgost/gost94_keyx.c
    1.8         +4  -4     
openssl/engines/ccgost/gost_ameth.c
    1.11        +6  -6     
openssl/engines/ccgost/gost_pmeth.c
    1.4         +1  -1     
openssl/engines/ccgost/gost_sign.c
 
____________________________________________________________
________________

  patch -p0 <<' .'
  Index: openssl/engines/ccgost/e_gost_err.c
 
============================================================
================
  $ cvs diff -u -r1.6 -r1.7 e_gost_err.c
  --- openssl/engines/ccgost/e_gost_err.c	21 Nov 2007
12:39:11 -0000	1.6
  +++ openssl/engines/ccgost/e_gost_err.c	28 Feb 2008
13:45:05 -0000	1.7
   -71,38 +71,31 
   static ERR_STRING_DATA GOST_str_functs[]=
   	{
  
{ERR_FUNC(GOST_F_DECODE_GOST_ALGOR_PARAMS),	"DECODE_GOS
T_ALGOR_PARAMS"},
 
-{ERR_FUNC(GOST_F_DECRYPT_CRYPTOCOM_KEY),	"decrypt_cryp
tocom_key"},
  
{ERR_FUNC(GOST_F_ENCODE_GOST_ALGOR_PARAMS),	"ENCODE_GOS
T_ALGOR_PARAMS"},
  
{ERR_FUNC(GOST_F_FILL_GOST2001_PARAMS),	"FILL_GOST2001_
PARAMS"},
  
{ERR_FUNC(GOST_F_FILL_GOST94_PARAMS),	"FILL_GOST94_PARA
MS"},
 
-{ERR_FUNC(GOST_F_GET_ENCRYPTION_PARAMS),	"get_encrypti
on_params"},
 
+{ERR_FUNC(GOST_F_GET_ENCRYPTION_PARAMS),	"GET_ENCRYPTI
ON_PARAMS"},
  
{ERR_FUNC(GOST_F_GOST2001_COMPUTE_PUBLIC),	"GOST2001_CO
MPUTE_PUBLIC"},
  
{ERR_FUNC(GOST_F_GOST2001_DO_SIGN),	"GOST2001_DO_SIGN&q
uot;},
  
{ERR_FUNC(GOST_F_GOST2001_DO_VERIFY),	"GOST2001_DO_VERI
FY"},
 
-{ERR_FUNC(GOST_F_GOST89_GET_ASN1_PARAMETERS),	"gost89_
get_asn1_parameters"},
 
-{ERR_FUNC(GOST_F_GOST89_SET_ASN1_PARAMETERS),	"gost89_
set_asn1_parameters"},
 
-{ERR_FUNC(GOST_F_GOST94_COPY_PARAMETERS),	"GOST94_COPY
_PARAMETERS"},
 
-{ERR_FUNC(GOST_F_GOST_CIPHER_CTL),	"gost_cipher_ctl&qu
ot;},
 
-{ERR_FUNC(GOST_F_GOST_COMPUTE_PUBLIC),	"GOST_COMPUTE_P
UBLIC"},
 
+{ERR_FUNC(GOST_F_GOST2001_KEYGEN),	"GOST2001_KEYGEN&qu
ot;},
 
+{ERR_FUNC(GOST_F_GOST89_GET_ASN1_PARAMETERS),	"GOST89_
GET_ASN1_PARAMETERS"},
 
+{ERR_FUNC(GOST_F_GOST89_SET_ASN1_PARAMETERS),	"GOST89_
SET_ASN1_PARAMETERS"},
 
+{ERR_FUNC(GOST_F_GOST94_COMPUTE_PUBLIC),	"GOST94_COMPU
TE_PUBLIC"},
 
+{ERR_FUNC(GOST_F_GOST_CIPHER_CTL),	"GOST_CIPHER_CTL&qu
ot;},
  
{ERR_FUNC(GOST_F_GOST_DO_SIGN),	"GOST_DO_SIGN"},
  
{ERR_FUNC(GOST_F_GOST_DO_VERIFY),	"GOST_DO_VERIFY"
},
  
{ERR_FUNC(GOST_F_GOST_IMIT_CTRL),	"GOST_IMIT_CTRL"
},
  
{ERR_FUNC(GOST_F_GOST_IMIT_UPDATE),	"GOST_IMIT_UPDATE&q
uot;},
 
-{ERR_FUNC(GOST_F_MAKE_RFC4490_KEYTRANSPORT_2001),	"MAK
E_RFC4490_KEYTRANSPORT_2001"},
  
{ERR_FUNC(GOST_F_PARAM_COPY_GOST01),	"PARAM_COPY_GOST01
"},
  
{ERR_FUNC(GOST_F_PARAM_COPY_GOST94),	"PARAM_COPY_GOST94
"},
 
-{ERR_FUNC(GOST_F_PKCS7_GOST94CP_KEY_TRANSPORT_DECRYPT),	&qu
ot;PKCS7_GOST94CP_KEY_TRANSPORT_DECRYPT"},
 
-{ERR_FUNC(GOST_F_PKCS7_GOST94_KEY_TRANSPORT_DECRYPT),	"
;PKCS7_GOST94_KEY_TRANSPORT_DECRYPT"},
 
-{ERR_FUNC(GOST_F_PKEY_GOST01CC_DECRYPT),	"pkey_GOST01c
c_decrypt"},
 
-{ERR_FUNC(GOST_F_PKEY_GOST01CC_ENCRYPT),	"pkey_GOST01c
c_encrypt"},
 
-{ERR_FUNC(GOST_F_PKEY_GOST01CP_ENCRYPT),	"pkey_GOST01c
p_encrypt"},
 
-{ERR_FUNC(GOST_F_PKEY_GOST01_KEYGEN),	"PKEY_GOST01_KEY
GEN"},
 
+{ERR_FUNC(GOST_F_PKEY_GOST01CP_DECRYPT),	"PKEY_GOST01C
P_DECRYPT"},
 
+{ERR_FUNC(GOST_F_PKEY_GOST01CP_ENCRYPT),	"PKEY_GOST01C
P_ENCRYPT"},
 
+{ERR_FUNC(GOST_F_PKEY_GOST01CP_KEYGEN),	"PKEY_GOST01CP
_KEYGEN"},
  
{ERR_FUNC(GOST_F_PKEY_GOST2001_DERIVE),	"PKEY_GOST2001_
DERIVE"},
 
-{ERR_FUNC(GOST_F_PKEY_GOST94CC_DECRYPT),	"pkey_GOST94c
c_decrypt"},
 
-{ERR_FUNC(GOST_F_PKEY_GOST94CC_ENCRYPT),	"pkey_GOST94c
c_encrypt"},
 
-{ERR_FUNC(GOST_F_PKEY_GOST94CP_DECRYPT),	"pkey_GOST94c
p_decrypt"},
 
-{ERR_FUNC(GOST_F_PKEY_GOST94CP_ENCRYPT),	"pkey_GOST94c
p_encrypt"},
 
-{ERR_FUNC(GOST_F_PKEY_GOST94_KEYGEN),	"PKEY_GOST94_KEY
GEN"},
 
+{ERR_FUNC(GOST_F_PKEY_GOST94CP_DECRYPT),	"PKEY_GOST94C
P_DECRYPT"},
 
+{ERR_FUNC(GOST_F_PKEY_GOST94CP_ENCRYPT),	"PKEY_GOST94C
P_ENCRYPT"},
 
+{ERR_FUNC(GOST_F_PKEY_GOST94CP_KEYGEN),	"PKEY_GOST94CP
_KEYGEN"},
  
{ERR_FUNC(GOST_F_PKEY_GOST_CTRL),	"PKEY_GOST_CTRL"
},
  
{ERR_FUNC(GOST_F_PKEY_GOST_CTRL01_STR),	"PKEY_GOST_CTRL
01_STR"},
  
{ERR_FUNC(GOST_F_PKEY_GOST_CTRL94_STR),	"PKEY_GOST_CTRL
94_STR"},
   -110,8 +103,7 
  
{ERR_FUNC(GOST_F_PKEY_GOST_MAC_CTRL_STR),	"PKEY_GOST_MA
C_CTRL_STR"},
  
{ERR_FUNC(GOST_F_PKEY_GOST_MAC_KEYGEN),	"PKEY_GOST_MAC_
KEYGEN"},
  
{ERR_FUNC(GOST_F_PRINT_GOST_01),	"PRINT_GOST_01"},

 
-{ERR_FUNC(GOST_F_PRIV_DECODE_GOST_94),	"PRIV_DECODE_GO
ST_94"},
 
-{ERR_FUNC(GOST_F_PRIV_DECODE_MAC),	"PRIV_DECODE_MAC&qu
ot;},
 
+{ERR_FUNC(GOST_F_PRIV_DECODE_GOST),	"PRIV_DECODE_GOST&
quot;},
  
{ERR_FUNC(GOST_F_PUB_DECODE_GOST01),	"PUB_DECODE_GOST01
"},
  
{ERR_FUNC(GOST_F_PUB_DECODE_GOST94),	"PUB_DECODE_GOST94
"},
  
{ERR_FUNC(GOST_F_PUB_ENCODE_GOST01),	"PUB_ENCODE_GOST01
"},
   -125,19 +117,13 
   {ERR_REASON(GOST_R_BAD_KEY_PARAMETERS_FORMAT),"bad
key parameters format"},
   {ERR_REASON(GOST_R_BAD_PKEY_PARAMETERS_FORMAT),"bad
pkey parameters format"},
  
{ERR_REASON(GOST_R_CANNOT_PACK_EPHEMERAL_KEY),"cannot
pack ephemeral key"},
 
-{ERR_REASON(GOST_R_CTX_NOT_INITIALIZED_FOR_ENCRYPT),"c
tx not initialized for encrypt"},
  -{ERR_REASON(GOST_R_ERROR_COMPUTING_MAC)  ,"error
computing mac"},
  
{ERR_REASON(GOST_R_ERROR_COMPUTING_SHARED_KEY),"error
computing shared key"},
  
{ERR_REASON(GOST_R_ERROR_PACKING_KEY_TRANSPORT_INFO),"e
rror packing key transport info"},
  
{ERR_REASON(GOST_R_ERROR_PARSING_KEY_TRANSPORT_INFO),"e
rror parsing key transport info"},
 
-{ERR_REASON(GOST_R_ERROR_STORING_ENCRYPTED_KEY),"error
storing encrypted key"},
  -{ERR_REASON(GOST_R_ERROR_STORING_IV)     ,"error
storing iv"},
  -{ERR_REASON(GOST_R_ERROR_STORING_MAC)    ,"error
storing mac"},
  
{ERR_REASON(GOST_R_INCOMPATIBLE_ALGORITHMS),"incompatib
le algorithms"},
   {ERR_REASON(GOST_R_INVALID_CIPHER_PARAMS),"invalid
cipher params"},
  
{ERR_REASON(GOST_R_INVALID_CIPHER_PARAM_OID),"invalid
cipher param oid"},
   {ERR_REASON(GOST_R_INVALID_DIGEST_TYPE)  ,"invalid
digest type"},
 
-{ERR_REASON(GOST_R_INVALID_ENCRYPTED_KEY_SIZE),"invali
d encrypted key size"},
   {ERR_REASON(GOST_R_INVALID_GOST94_PARMSET),"invalid
gost94 parmset"},
   {ERR_REASON(GOST_R_INVALID_IV_LENGTH)    ,"invalid
iv length"},
   {ERR_REASON(GOST_R_INVALID_MAC_KEY_LENGTH),"invalid
mac key length"},
   -147,7 +133,6 
   {ERR_REASON(GOST_R_KEY_PARAMETERS_MISSING),"key
parameters missing"},
   {ERR_REASON(GOST_R_MAC_KEY_NOT_SET)      ,"mac key
not set"},
   {ERR_REASON(GOST_R_MALLOC_FAILURE)       ,"malloc
failure"},
  -{ERR_REASON(GOST_R_NOT_ENOUGH_SPACE_FOR_KEY),"not
enough space for key"},
   {ERR_REASON(GOST_R_NO_MEMORY)            ,"no
memory"},
   {ERR_REASON(GOST_R_NO_PARAMETERS_SET)    ,"no
parameters set"},
   {ERR_REASON(GOST_R_NO_PEER_KEY)          ,"no peer
key"},
   -156,7 +141,6 
   {ERR_REASON(GOST_R_RANDOM_GENERATOR_ERROR),"random
generator error"},
   {ERR_REASON(GOST_R_RANDOM_GENERATOR_FAILURE),"random
generator failure"},
  
{ERR_REASON(GOST_R_RANDOM_NUMBER_GENERATOR_FAILED),"ran
dom number generator failed"},
 
-{ERR_REASON(GOST_R_SESSION_KEY_MAC_DOES_NOT_MATCH),"se
ssion key mac does not match"},
   {ERR_REASON(GOST_R_SIGNATURE_MISMATCH)   ,"signature
mismatch"},
  
{ERR_REASON(GOST_R_SIGNATURE_PARTS_GREATER_THAN_Q),"sig
nature parts greater than q"},
   {ERR_REASON(GOST_R_UKM_NOT_SET)          ,"ukm not
set"},
   .
  patch -p0 <<' .'
  Index: openssl/engines/ccgost/e_gost_err.h
 
============================================================
================
  $ cvs diff -u -r1.6 -r1.7 e_gost_err.h
  --- openssl/engines/ccgost/e_gost_err.h	21 Nov 2007
12:39:11 -0000	1.6
  +++ openssl/engines/ccgost/e_gost_err.h	28 Feb 2008
13:45:05 -0000	1.7
   -67,95 +67,79 
   /* Error codes for the GOST functions. */
   
   /* Function codes. */
  -#define GOST_F_DECODE_GOST_ALGOR_PARAMS			 131
  -#define GOST_F_DECRYPT_CRYPTOCOM_KEY			 120
  -#define GOST_F_ENCODE_GOST_ALGOR_PARAMS			 130
  -#define GOST_F_FILL_GOST2001_PARAMS			 144
  -#define GOST_F_FILL_GOST94_PARAMS			 100
  -#define GOST_F_GET_ENCRYPTION_PARAMS			 101
  -#define GOST_F_GOST2001_COMPUTE_PUBLIC			 102
  -#define GOST_F_GOST2001_DO_SIGN				 103
  -#define GOST_F_GOST2001_DO_VERIFY			 104
  -#define GOST_F_GOST89_GET_ASN1_PARAMETERS		 105
  -#define GOST_F_GOST89_SET_ASN1_PARAMETERS		 106
  -#define GOST_F_GOST94_COPY_PARAMETERS			 107
  -#define GOST_F_GOST_CIPHER_CTL				 108
  -#define GOST_F_GOST_COMPUTE_PUBLIC			 109
  -#define GOST_F_GOST_DO_SIGN				 110
  -#define GOST_F_GOST_DO_VERIFY				 111
  -#define GOST_F_GOST_IMIT_CTRL				 138
  -#define GOST_F_GOST_IMIT_UPDATE				 139
  -#define GOST_F_MAKE_RFC4490_KEYTRANSPORT_2001		 127
  -#define GOST_F_PARAM_COPY_GOST01			 132
  -#define GOST_F_PARAM_COPY_GOST94			 133
  -#define GOST_F_PKCS7_GOST94CP_KEY_TRANSPORT_DECRYPT	 121
  -#define GOST_F_PKCS7_GOST94_KEY_TRANSPORT_DECRYPT	 122
  -#define GOST_F_PKEY_GOST01CC_DECRYPT			 128
  -#define GOST_F_PKEY_GOST01CC_ENCRYPT			 129
  -#define GOST_F_PKEY_GOST01CP_ENCRYPT			 137
  -#define GOST_F_PKEY_GOST01_KEYGEN			 112
  -#define GOST_F_PKEY_GOST2001_DERIVE			 145
  -#define GOST_F_PKEY_GOST94CC_DECRYPT			 125
  -#define GOST_F_PKEY_GOST94CC_ENCRYPT			 123
  -#define GOST_F_PKEY_GOST94CP_DECRYPT			 126
  -#define GOST_F_PKEY_GOST94CP_ENCRYPT			 124
  -#define GOST_F_PKEY_GOST94_KEYGEN			 113
  -#define GOST_F_PKEY_GOST_CTRL				 114
  -#define GOST_F_PKEY_GOST_CTRL01_STR			 115
  -#define GOST_F_PKEY_GOST_CTRL94_STR			 116
  -#define GOST_F_PKEY_GOST_MAC_CTRL			 140
  -#define GOST_F_PKEY_GOST_MAC_CTRL_STR			 141
  -#define GOST_F_PKEY_GOST_MAC_KEYGEN			 142
  -#define GOST_F_PRINT_GOST_01				 146
  -#define GOST_F_PRIV_DECODE_GOST_94			 117
  -#define GOST_F_PRIV_DECODE_MAC				 143
  -#define GOST_F_PUB_DECODE_GOST01			 136
  +#define GOST_F_DECODE_GOST_ALGOR_PARAMS			 99
  +#define GOST_F_ENCODE_GOST_ALGOR_PARAMS			 100
  +#define GOST_F_FILL_GOST2001_PARAMS			 101
  +#define GOST_F_FILL_GOST94_PARAMS			 102
  +#define GOST_F_GET_ENCRYPTION_PARAMS			 103
  +#define GOST_F_GOST2001_COMPUTE_PUBLIC			 104
  +#define GOST_F_GOST2001_DO_SIGN				 105
  +#define GOST_F_GOST2001_DO_VERIFY			 106
  +#define GOST_F_GOST2001_KEYGEN				 107
  +#define GOST_F_GOST89_GET_ASN1_PARAMETERS		 108
  +#define GOST_F_GOST89_SET_ASN1_PARAMETERS		 109
  +#define GOST_F_GOST94_COMPUTE_PUBLIC			 110
  +#define GOST_F_GOST_CIPHER_CTL				 111
  +#define GOST_F_GOST_DO_SIGN				 112
  +#define GOST_F_GOST_DO_VERIFY				 113
  +#define GOST_F_GOST_IMIT_CTRL				 114
  +#define GOST_F_GOST_IMIT_UPDATE				 115
  +#define GOST_F_PARAM_COPY_GOST01			 116
  +#define GOST_F_PARAM_COPY_GOST94			 117
  +#define GOST_F_PKEY_GOST01CP_DECRYPT			 118
  +#define GOST_F_PKEY_GOST01CP_ENCRYPT			 119
  +#define GOST_F_PKEY_GOST01CP_KEYGEN			 120
  +#define GOST_F_PKEY_GOST2001_DERIVE			 121
  +#define GOST_F_PKEY_GOST94CP_DECRYPT			 122
  +#define GOST_F_PKEY_GOST94CP_ENCRYPT			 123
  +#define GOST_F_PKEY_GOST94CP_KEYGEN			 124
  +#define GOST_F_PKEY_GOST_CTRL				 125
  +#define GOST_F_PKEY_GOST_CTRL01_STR			 126
  +#define GOST_F_PKEY_GOST_CTRL94_STR			 127
  +#define GOST_F_PKEY_GOST_MAC_CTRL			 128
  +#define GOST_F_PKEY_GOST_MAC_CTRL_STR			 129
  +#define GOST_F_PKEY_GOST_MAC_KEYGEN			 130
  +#define GOST_F_PRINT_GOST_01				 131
  +#define GOST_F_PRIV_DECODE_GOST				 132
  +#define GOST_F_PUB_DECODE_GOST01			 133
   #define GOST_F_PUB_DECODE_GOST94			 134
   #define GOST_F_PUB_ENCODE_GOST01			 135
  -#define GOST_F_UNPACK_CC_SIGNATURE			 118
  -#define GOST_F_UNPACK_CP_SIGNATURE			 119
  +#define GOST_F_UNPACK_CC_SIGNATURE			 136
  +#define GOST_F_UNPACK_CP_SIGNATURE			 137
   
   /* Reason codes. */
  -#define GOST_R_BAD_KEY_PARAMETERS_FORMAT		 128
  -#define GOST_R_BAD_PKEY_PARAMETERS_FORMAT		 129
  -#define GOST_R_CANNOT_PACK_EPHEMERAL_KEY		 114
  -#define GOST_R_CTX_NOT_INITIALIZED_FOR_ENCRYPT		 115
  -#define GOST_R_ERROR_COMPUTING_MAC			 116
  -#define GOST_R_ERROR_COMPUTING_SHARED_KEY		 117
  -#define GOST_R_ERROR_PACKING_KEY_TRANSPORT_INFO		 118
  -#define GOST_R_ERROR_PARSING_KEY_TRANSPORT_INFO		 119
  -#define GOST_R_ERROR_STORING_ENCRYPTED_KEY		 120
  -#define GOST_R_ERROR_STORING_IV				 121
  -#define GOST_R_ERROR_STORING_MAC			 122
  -#define GOST_R_INCOMPATIBLE_ALGORITHMS			 130
  -#define GOST_R_INVALID_CIPHER_PARAMS			 136
  -#define GOST_R_INVALID_CIPHER_PARAM_OID			 100
  -#define GOST_R_INVALID_DIGEST_TYPE			 101
  -#define GOST_R_INVALID_ENCRYPTED_KEY_SIZE		 123
  -#define GOST_R_INVALID_GOST94_PARMSET			 127
  -#define GOST_R_INVALID_IV_LENGTH			 102
  -#define GOST_R_INVALID_MAC_KEY_LENGTH			 134
  -#define GOST_R_INVALID_PARAMSET				 103
  -#define GOST_R_KEY_IS_NOT_INITALIZED			 104
  -#define GOST_R_KEY_IS_NOT_INITIALIZED			 105
  -#define GOST_R_KEY_PARAMETERS_MISSING			 131
  -#define GOST_R_MAC_KEY_NOT_SET				 135
  -#define GOST_R_MALLOC_FAILURE				 124
  -#define GOST_R_NOT_ENOUGH_SPACE_FOR_KEY			 125
  -#define GOST_R_NO_MEMORY				 106
  -#define GOST_R_NO_PARAMETERS_SET			 107
  -#define GOST_R_NO_PEER_KEY				 137
  -#define GOST_R_NO_PRIVATE_PART_OF_NON_EPHEMERAL_KEYPAIR	
139
  -#define GOST_R_PUBLIC_KEY_UNDEFINED			 132
  -#define GOST_R_RANDOM_GENERATOR_ERROR			 108
  -#define GOST_R_RANDOM_GENERATOR_FAILURE			 133
  -#define GOST_R_RANDOM_NUMBER_GENERATOR_FAILED		 109
  -#define GOST_R_SESSION_KEY_MAC_DOES_NOT_MATCH		 126
  -#define GOST_R_SIGNATURE_MISMATCH			 110
  -#define GOST_R_SIGNATURE_PARTS_GREATER_THAN_Q		 111
  -#define GOST_R_UKM_NOT_SET				 138
  -#define GOST_R_UNSUPPORTED_CIPHER_CTL_COMMAND		 112
  -#define GOST_R_UNSUPPORTED_PARAMETER_SET		 113
  +#define GOST_R_BAD_KEY_PARAMETERS_FORMAT		 99
  +#define GOST_R_BAD_PKEY_PARAMETERS_FORMAT		 100
  +#define GOST_R_CANNOT_PACK_EPHEMERAL_KEY		 101
  +#define GOST_R_ERROR_COMPUTING_SHARED_KEY		 102
  +#define GOST_R_ERROR_PACKING_KEY_TRANSPORT_INFO		 103
  +#define GOST_R_ERROR_PARSING_KEY_TRANSPORT_INFO		 104
  +#define GOST_R_INCOMPATIBLE_ALGORITHMS			 105
  +#define GOST_R_INVALID_CIPHER_PARAMS			 106
  +#define GOST_R_INVALID_CIPHER_PARAM_OID			 107
  +#define GOST_R_INVALID_DIGEST_TYPE			 108
  +#define GOST_R_INVALID_GOST94_PARMSET			 109
  +#define GOST_R_INVALID_IV_LENGTH			 110
  +#define GOST_R_INVALID_MAC_KEY_LENGTH			 111
  +#define GOST_R_INVALID_PARAMSET				 112
  +#define GOST_R_KEY_IS_NOT_INITALIZED			 113
  +#define GOST_R_KEY_IS_NOT_INITIALIZED			 114
  +#define GOST_R_KEY_PARAMETERS_MISSING			 115
  +#define GOST_R_MAC_KEY_NOT_SET				 116
  +#define GOST_R_MALLOC_FAILURE				 117
  +#define GOST_R_NO_MEMORY				 118
  +#define GOST_R_NO_PARAMETERS_SET			 119
  +#define GOST_R_NO_PEER_KEY				 120
  +#define GOST_R_NO_PRIVATE_PART_OF_NON_EPHEMERAL_KEYPAIR	
121
  +#define GOST_R_PUBLIC_KEY_UNDEFINED			 122
  +#define GOST_R_RANDOM_GENERATOR_ERROR			 123
  +#define GOST_R_RANDOM_GENERATOR_FAILURE			 124
  +#define GOST_R_RANDOM_NUMBER_GENERATOR_FAILED		 125
  +#define GOST_R_SIGNATURE_MISMATCH			 126
  +#define GOST_R_SIGNATURE_PARTS_GREATER_THAN_Q		 127
  +#define GOST_R_UKM_NOT_SET				 128
  +#define GOST_R_UNSUPPORTED_CIPHER_CTL_COMMAND		 129
  +#define GOST_R_UNSUPPORTED_PARAMETER_SET		 130
   
   #ifdef  __cplusplus
   }
   .
  patch -p0 <<' .'
  Index: openssl/engines/ccgost/gost2001.c
 
============================================================
================
  $ cvs diff -u -r1.2 -r1.3 gost2001.c
  --- openssl/engines/ccgost/gost2001.c	21 Sep 2006 13:04:40
-0000	1.2
  +++ openssl/engines/ccgost/gost2001.c	28 Feb 2008 13:45:05
-0000	1.3
   -205,7 +205,7 
   	if (BN_is_zero(sig->s) || BN_is_zero(sig->r) ||
   		(BN_cmp(sig->s,order)>=1) ||
(BN_cmp(sig->r,order)>=1)) 
   		{
 
-		GOSTerr(GOST_F_GOST_DO_VERIFY,GOST_R_SIGNATURE_PARTS_GREA
TER_THAN_Q);
 
+		GOSTerr(GOST_F_GOST2001_DO_VERIFY,GOST_R_SIGNATURE_PARTS_
GREATER_THAN_Q);
   		goto err;
   
   		}
   -325,7 +325,7 
   		{
   		if (!BN_rand_range(d,order)) 
   			{
 
-			GOSTerr(GOST_F_GOST2001_DO_SIGN,GOST_R_RANDOM_NUMBER_GEN
ERATOR_FAILED);
 
+			GOSTerr(GOST_F_GOST2001_KEYGEN,GOST_R_RANDOM_NUMBER_GENE
RATOR_FAILED);
   			BN_free(d);
   			BN_free(order);
   			return 0;
   .
  patch -p0 <<' .'
  Index: openssl/engines/ccgost/gost2001_keyx.c
 
============================================================
================
  $ cvs diff -u -r1.5 -r1.6 gost2001_keyx.c
  --- openssl/engines/ccgost/gost2001_keyx.c	26 Oct 2007
12:06:33 -0000	1.5
  +++ openssl/engines/ccgost/gost2001_keyx.c	28 Feb 2008
13:45:05 -0000	1.6
   -114,7 +114,7 
    * Implementation of GOST2001 key transport, cryptopo
variation 
    */
   
  -int pkey_GOST01cp_encrypt (EVP_PKEY_CTX *pctx, unsigned
char *out, size_t *out_len, const unsigned char *key,size_t
key_len) 
  +int pkey_GOST01cp_encrypt(EVP_PKEY_CTX *pctx, unsigned
char *out, size_t *out_len, const unsigned char *key,size_t
key_len) 
   	{
   	GOST_KEY_TRANSPORT *gkt=NULL; 
   	EVP_PKEY *pubk = EVP_PKEY_CTX_get0_pkey(pctx);
   -195,7 +195,7 
   	if (key_is_ephemeral) {	
   		if
(!X509_PUBKEY_set(&gkt->key_agreement_info->ephem_
key,out?sec_key:pubk))
   			{
  -			GOSTerr(GOST_F_MAKE_RFC4490_KEYTRANSPORT_2001,
  +			GOSTerr(GOST_F_PKEY_GOST01CP_ENCRYPT,
   					GOST_R_CANNOT_PACK_EPHEMERAL_KEY);
   			goto err;
   			}	
   -215,7 +215,7 
    * EVP_PKEY_METHOD callback decrypt  
    * Implementation of GOST2001 key transport, cryptopo
variation 
    */
  -int pkey_GOST01cp_decrypt (EVP_PKEY_CTX *pctx, unsigned
char *key, size_t * key_len, const unsigned char *in, size_t
in_len)
  +int pkey_GOST01cp_decrypt(EVP_PKEY_CTX *pctx, unsigned
char *key, size_t * key_len, const unsigned char *in, size_t
in_len)
   	{
   	const unsigned char *p = in;
   	EVP_PKEY *priv = EVP_PKEY_CTX_get0_pkey(pctx);
   -236,7 +236,7 
   		in_len);
   	if (!gkt)
   		{
 
-		GOSTerr(GOST_F_PKCS7_GOST94CP_KEY_TRANSPORT_DECRYPT,GOST_
R_ERROR_PARSING_KEY_TRANSPORT_INFO);
 
+		GOSTerr(GOST_F_PKEY_GOST01CP_DECRYPT,GOST_R_ERROR_PARSING
_KEY_TRANSPORT_INFO);
   		return -1;
   		}	
       
   -244,7 +244,7 
   	if (!eph_key) {
   		eph_key = EVP_PKEY_CTX_get0_peerkey(pctx);
   		if (! eph_key) {
  -			GOSTerr(GOST_F_PKEY_GOST94CP_DECRYPT,
  +			GOSTerr(GOST_F_PKEY_GOST01CP_DECRYPT,
   				GOST_R_NO_PEER_KEY);
   			goto err;
   		}
   -264,7 +264,7 
   		EVP_PKEY_get0(priv),wrappedKey);
   	if
(!keyUnwrapCryptoPro(&ctx,sharedKey,wrappedKey,key))
   		{
  -		GOSTerr(GOST_F_PKCS7_GOST94CP_KEY_TRANSPORT_DECRYPT,
  +		GOSTerr(GOST_F_PKEY_GOST01CP_DECRYPT,
   			GOST_R_ERROR_COMPUTING_SHARED_KEY);
   		goto err;
   		}	
   .
  patch -p0 <<' .'
  Index: openssl/engines/ccgost/gost94_keyx.c
 
============================================================
================
  $ cvs diff -u -r1.4 -r1.5 gost94_keyx.c
  --- openssl/engines/ccgost/gost94_keyx.c	26 Oct 2007
12:06:33 -0000	1.4
  +++ openssl/engines/ccgost/gost94_keyx.c	28 Feb 2008
13:45:05 -0000	1.5
   -198,7 +198,7 
   /* EVP_PLEY_METHOD callback decrypt for
    * GOST R 34.10-94 cryptopro modification
    */
  -int pkey_GOST94cp_decrypt (EVP_PKEY_CTX *ctx, unsigned
char *key, size_t *key_len,const unsigned char *in, size_t
in_len) {
  +int pkey_GOST94cp_decrypt(EVP_PKEY_CTX *ctx, unsigned
char *key, size_t *key_len,const unsigned char *in, size_t
in_len) {
   	const unsigned char *p = in;
   	GOST_KEY_TRANSPORT *gkt = NULL;
   	unsigned char wrappedKey[44];
   .
  patch -p0 <<' .'
  Index: openssl/engines/ccgost/gost_ameth.c
 
============================================================
================
  $ cvs diff -u -r1.7 -r1.8 gost_ameth.c
  --- openssl/engines/ccgost/gost_ameth.c	21 Nov 2007
12:39:12 -0000	1.7
  +++ openssl/engines/ccgost/gost_ameth.c	28 Feb 2008
13:45:05 -0000	1.8
   -294,7 +294,7 
   		ASN1_OCTET_STRING *s =
d2i_ASN1_OCTET_STRING(NULL,&p,priv_len);
   		if (!s||s->length !=32) 
   			{
  -			GOSTerr(GOST_F_PRIV_DECODE_GOST_94,
  +			GOSTerr(GOST_F_PRIV_DECODE_GOST,
   				EVP_R_DECODE_ERROR);
   			return 0;	
   			}
   -313,7 +313,7 
   		ASN1_INTEGER_free(priv_key);
   		if (!ret)
   			{
  -			GOSTerr(GOST_F_PRIV_DECODE_GOST_94,
  +			GOSTerr(GOST_F_PRIV_DECODE_GOST,
   				EVP_R_DECODE_ERROR);
   			return 0;	
   			}
   -528,7 +528,7 
   		}	
   	if (!efrom) 
   		{
  -		GOSTerr(GOST_F_PARAM_COPY_GOST94,
  +		GOSTerr(GOST_F_PARAM_COPY_GOST01,
   			GOST_R_KEY_PARAMETERS_MISSING);
   		return 0;
   		}	
   -653,7 +653,7 
   	octet =
d2i_ASN1_OCTET_STRING(NULL,&pubkey_buf,pub_len);
   	if (!octet) 
   		{
 
-		GOSTerr(GOST_F_PUB_DECODE_GOST94,ERR_R_MALLOC_FAILURE);
 
+		GOSTerr(GOST_F_PUB_DECODE_GOST01,ERR_R_MALLOC_FAILURE);
   		return 0;
   		}	
   	databuf = OPENSSL_malloc(octet->length);
   .
  patch -p0 <<' .'
  Index: openssl/engines/ccgost/gost_pmeth.c
 
============================================================
================
  $ cvs diff -u -r1.10 -r1.11 gost_pmeth.c
  --- openssl/engines/ccgost/gost_pmeth.c	16 Nov 2007
03:03:01 -0000	1.10
  +++ openssl/engines/ccgost/gost_pmeth.c	28 Feb 2008
13:45:06 -0000	1.11
   -55,7 +55,7 
   	}	
   
   /* --------------------- control functions 
------------------------------*/
  -static int pkey_gost_ctrl (EVP_PKEY_CTX *ctx, int type,
int p1, void *p2)
  +static int pkey_gost_ctrl(EVP_PKEY_CTX *ctx, int type,
int p1, void *p2)
   	{
   	struct gost_pmeth_data *pctx = (struct
gost_pmeth_data*)EVP_PKEY_CTX_get_data(ctx);
   	switch (type)
   -241,13 +241,13 
   
   
   /* Generates Gost_R3410_94_cp key */
  -static int pkey_gost94cp_keygen (EVP_PKEY_CTX *ctx,
EVP_PKEY *pkey)
  +static int pkey_gost94cp_keygen(EVP_PKEY_CTX *ctx,
EVP_PKEY *pkey)
   	{
   	struct gost_pmeth_data *data =
EVP_PKEY_CTX_get_data(ctx);
   	DSA *dsa=NULL;
   	if (data->sign_param_nid == NID_undef)
   		{
  -			GOSTerr(GOST_F_PKEY_GOST94_KEYGEN,
  +			GOSTerr(GOST_F_PKEY_GOST94CP_KEYGEN,
   				GOST_R_NO_PARAMETERS_SET);
   			return 0;
   		}
   -263,13 +263,13 
   	}
   
   /* Generates GOST_R3410 2001 key and assigns it using
specified type */
  -static int pkey_gost01cp_keygen (EVP_PKEY_CTX *ctx,
EVP_PKEY *pkey)
  +static int pkey_gost01cp_keygen(EVP_PKEY_CTX *ctx,
EVP_PKEY *pkey)
   	{
   	struct gost_pmeth_data *data =
EVP_PKEY_CTX_get_data(ctx);
   	EC_KEY *ec=NULL;
   	if (data->sign_param_nid == NID_undef)
   		{
  -			GOSTerr(GOST_F_PKEY_GOST01_KEYGEN,
  +			GOSTerr(GOST_F_PKEY_GOST01CP_KEYGEN,
   				GOST_R_NO_PARAMETERS_SET);
   			return 0;
   		}
   -400,7 +400,7 
   	return 1;
   	}
   	
  -static int pkey_gost_mac_ctrl (EVP_PKEY_CTX *ctx, int
type, int p1, void *p2)
  +static int pkey_gost_mac_ctrl(EVP_PKEY_CTX *ctx, int
type, int p1, void *p2)
   	{
   	struct gost_mac_pmeth_data *data =
   (struct gost_mac_pmeth_data*)EVP_PKEY_CTX_get_data(ctx);
   .
  patch -p0 <<' .'
  Index: openssl/engines/ccgost/gost_sign.c
 
============================================================
================
  $ cvs diff -u -r1.3 -r1.4 gost_sign.c
  --- openssl/engines/ccgost/gost_sign.c	16 Nov 2007
03:03:01 -0000	1.3
  +++ openssl/engines/ccgost/gost_sign.c	28 Feb 2008
13:45:06 -0000	1.4
   -197,7 +197,7 
   	BN_CTX *ctx = BN_CTX_new();
   	if (!dsa->g)
   		{
 
-		GOSTerr(GOST_F_GOST_COMPUTE_PUBLIC,GOST_R_KEY_IS_NOT_INIT
ALIZED);
 
+		GOSTerr(GOST_F_GOST94_COMPUTE_PUBLIC,GOST_R_KEY_IS_NOT_IN
ITALIZED);
   		return 0;
   		}	
   	/* Compute public key  y = a^x mod p */
   .
____________________________________________________________
__________
OpenSSL Project                                 http://www.openssl.org
CVS Repository Commit List                    
openssl-cvsopenssl.org
Automated List Manager                          
majordomoopenssl.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )