Статус: Сотрудник
Группы: Администраторы
Зарегистрирован: 16.09.2010(UTC) Сообщений: 1,488 Откуда: КРИПТО-ПРО
Сказал(а) «Спасибо»: 33 раз Поблагодарили: 450 раз в 326 постах
|
Автор: realmfoo ![Перейти к цитате Перейти к цитате](/forum2/Themes/soclean/icon_latest_reply.gif) Могу, конечно, ошибаться, но gdb считает, что указатель pem_str структуры EVP_PKEY_ASN1_METHOD ссылается не на настоящий адрес: Код:(gdb) where
#0 strlen () at ../sysdeps/x86_64/strlen.S:106
#1 0x00007ffff73c06c7 in look_str_cb (nid=815, sk=0x5555557fa9d0, def=<optimized out>, arg=0x7fffffffcee0) at tb_asnmth.c:218
#2 0x00007ffff73cc6fc in doall_util_fn (arg=0x7fffffffceb0, arg@entry=0x7fffffffce70, func_arg=func_arg@entry=0x7ffff73be960 <int_cb_LHASH_DOALL_ARG>, func=0x0, use_arg=1, lh=0x5555557fa760) at lhash.c:285
#3 lh_doall_arg (lh=0x5555557fa760, func=func@entry=0x7ffff73be960 <int_cb_LHASH_DOALL_ARG>, arg=arg@entry=0x7fffffffceb0) at lhash.c:300
#4 0x00007ffff73beea1 in engine_table_doall (table=<optimized out>, cb=cb@entry=0x7ffff73c0620 <look_str_cb>, arg=arg@entry=0x7fffffffcee0) at eng_table.c:355
#5 0x00007ffff73c0b13 in ENGINE_pkey_asn1_find_str (pe=pe@entry=0x7fffffffcf20, str=str@entry=0x7ffff77467b9 "gost-mac", len=len@entry=8) at tb_asnmth.c:237
#6 0x00007ffff73f4ff3 in EVP_PKEY_asn1_find_str (pe=pe@entry=0x7fffffffcf80, str=str@entry=0x7ffff77467b9 "gost-mac", len=8, len@entry=-1) at ameth_lib.c:208
#7 0x00007ffff773a367 in get_optional_pkey_id (pkey_name=pkey_name@entry=0x7ffff77467b9 "gost-mac") at ssl_ciph.c:393
#8 0x00007ffff773afd2 in ssl_load_ciphers () at ssl_ciph.c:452
#9 0x00007ffff7741db8 in SSL_library_init () at ssl_algs.c:153
#10 0x00005555555921fc in ?? ()
#11 0x000055555557951d in ?? ()
#12 0x000055555557c15a in ?? ()
#13 0x0000555555586f64 in ?? ()
#14 0x0000555555561f03 in ?? ()
#15 0x00007ffff6abc3f1 in __libc_start_main (main=0x555555560870, argc=2, argv=0x7fffffffdb28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdb18) at ../csu/libc-start.c:291
#16 0x0000555555562199 in ?? ()
(gdb) print
The history is empty.
(gdb) frame 1
#1 0x00007ffff73c06c7 in look_str_cb (nid=815, sk=0x5555557fa9d0, def=<optimized out>, arg=0x7fffffffcee0) at tb_asnmth.c:218
218 tb_asnmth.c: No such file or directory.
(gdb) p e
$2 = (ENGINE *) 0x5555557d66e0
(gdb) p *e
$3 = {id = 0x7ffff7e8d2c3 "gost_capi", name = 0x7ffff7e8ca48 "CryptoPro ENGINE GOST CAPI ($Revision: 162493 $)", rsa_meth = 0x0, dsa_meth = 0x0, dh_meth = 0x0, ecdh_meth = 0x0, ecdsa_meth = 0x0, rand_meth = 0x0, store_meth = 0x0,
ciphers = 0x7ffff7e4c8a0 <ngg_get_nids_cipher>, digests = 0x7ffff7e4c840 <ngg_get_nids_hash>, pkey_meths = 0x7ffff7e46780 <ngg_get_nids_pkey>, pkey_asn1_meths = 0x7ffff7e46a40 <ngg_get_nids_pkey_asn1>,
destroy = 0x7ffff7e47230 <ngg_engine_destroy>, init = 0x7ffff7e4a3b0 <ngg_engine_init>, finish = 0x7ffff7e4a380 <ngg_engine_finish>, ctrl = 0x7ffff7e4b940 <ngg_engine_ctrl>, load_privkey = 0x7ffff7e4c370 <ngg_pkey_load>,
load_pubkey = 0x0, load_ssl_client_cert = 0x0, cmd_defns = 0x0, flags = 8, struct_ref = 9, funct_ref = 8, ex_data = {sk = 0x5555557d68b0, dummy = 0}, prev = 0x5555557d6570, next = 0x0}
(gdb) p ameth
$4 = (EVP_PKEY_ASN1_METHOD *) 0x5555557d8870
(gdb) p ameth->pem_str
$5 = 0xa06806f <error: Cannot access memory at address 0xa06806f>
(gdb) p (*ameth)
$6 = {pkey_id = -143749008, pkey_base_id = 32767, pkey_flags = 93824994871472, pem_str = 0xa06806f <error: Cannot access memory at address 0xa06806f>, info = 0x21 <error: Cannot access memory at address 0x21>,
pub_decode = 0x7ffff76e9080 <DSA_str_functs+32>, pub_encode = 0x5555557feba0, pub_cmp = 0xa064035, pub_print = 0x21, priv_decode = 0x7ffff76e9090 <DSA_str_functs+48>, priv_encode = 0x55555582d7d0, priv_print = 0xa06506f,
pkey_size = 0x21, pkey_bits = 0x7ffff76e90a0 <DSA_str_functs+64>, param_decode = 0x5555557fec60, param_encode = 0xa07e0c2, param_missing = 0x21, param_copy = 0x7ffff76e90b0 <DSA_str_functs+80>, param_cmp = 0x55555582dd70,
param_print = 0xa070090, sig_print = 0x21, pkey_free = 0x7ffff76e90c0 <DSA_str_functs+96>, pkey_ctrl = 0x5555557d9760, old_priv_decode = 0xa0710f4, old_priv_encode = 0x21, item_verify = 0x7ffff76e90d0 <DSA_str_functs+112>,
item_sign = 0x55555582d9f0}
Да, загадка, как будто gost_capi скомпилирован с другой версией и структуры отличаются. Либо кто-то портит память. Странно, что нигде больше данная ошибка не проявляется. Может у wget есть какая-то особенность? Какой-то ещё функционал вызывает подобную ошибку? |