Page MenuHomePhorge

Crash when trying to create an smime key (on linux)
Closed, ResolvedPublic

Description

Crashes after password has been entered and random data has been gathered.

kleopatra(5823) {anonymous}::KeyCreationPage::createGnupgKeyParms:
"<GnupgKeyParms format="internal">
key-type: RSA
key-length: 2048
key-usage: sign encrypt
name-email: lskdjf@sdljf.com
name-dn: CN=fds dsf,O=lkj,C=lj
</GnupgKeyParms>
"
kleopatra(5823) Kleo::FileSystemWatcher::Private::onDirectoryChanged: "/home/chrigi/.gnupg"
kleopatra(5823) Kleo::FileSystemWatcher::Private::onDirectoryChanged: "/home/chrigi/.gnupg"
kleopatra(5823) Kleo::FileSystemWatcher::Private::onDirectoryChanged: "/home/chrigi/.gnupg"
kleopatra(5823) Kleo::FileSystemWatcher::Private::onDirectoryChanged: "/home/chrigi/.gnupg"
kleopatra(5823) Kleo::FileSystemWatcher::Private::onDirectoryChanged: "/home/chrigi/.gnupg/private-keys-v1.d"
kleopatra(5823) Kleo::FileSystemWatcher::Private::onDirectoryChanged: newFiles ("/home/chrigi/.gnupg/private-keys-v1.d/7AB0B32FE02282B705C71DDF9CF9A55F8EF43BF1.key")
kleopatra(5823) Kleo::FileSystemWatcher::addPaths: adding

"/home/chrigi/.gnupg/private-keys-v1.d/7AB0B32FE02282B705C71DDF9CF9A55F8EF43BF1.key"

/end
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kleopatra path = /home/chrigi/kdebuild/kdepim/install/bin pid = 5823
KCrash: Arguments: /home/chrigi/kdebuild/kdepim/install/bin/kleopatra --nocrashhandler
KCrash: Attempting to start from kdeinit
KCrash: Connect sock_file=/home/chrigi/.kde/socket-t420s.chrigi/kdeinit4__0
KCrash: Attempting to start directly
KCrash failed to exec(), errno = 2

Details

Ticket Type
Task

Event Timeline

mollekopf claimed this task.
mollekopf reassigned this task from mollekopf to knauss.
mollekopf raised the priority of this task from to Unbreak Now!.
mollekopf updated the task description. (Show Details)
mollekopf added projects: Restricted Project, KDE PIM.
mollekopf changed Ticket Type from Task to Task.
mollekopf updated the task description. (Show Details)
mollekopf added subscribers: knauss, mollekopf.

Value can't be converted to integer.
assuan_sendfd (ctx=0x0, fd=0x10) at assuan-buffer.c:518
518 if (! ctx->engine.sendfd)
gdb$ thread apply all bt

Thread 6 (Thread 0x7fffd7fff700 (LWP 26598)):
#0 0x00000030680062c0 in assuan_sendfd (ctx=0x0, fd=0x10) at assuan-buffer.c:518
#1 0x0000003067c1c0b6 in gpgsm_set_fd (gpgsm=gpgsm@entry=0x7fffcc003e60, fd_type=fd_type@entry=OUTPUT_FD, opt=opt@entry=0x0) at engine-gpgsm.c:698
#2 0x0000003067c1ccfe in gpgsm_getauditlog (engine=0x7fffcc003e60, output=<optimized out>, flags=0x81) at engine-gpgsm.c:1854
#3 0x0000003067c157d9 in gpgme_op_getauditlog (ctx=0x1208320, output=0x7fffcc006230, flags=0x81) at getauditlog.c:94
#4 0x00007ffff781e281 in GpgME::Context::getAuditLog(GpgME::Data&, unsigned int) (this=this@entry=0xc78050, output=..., flags=flags@entry=0x81) at /work/source/kdepimlibs/gpgme++/context.cpp:962
#5 0x00007ffff7d0fa85 in Kleo::_detail::audit_log_as_html(GpgME::Context*, GpgME::Error&) (ctx=ctx@entry=0xc78050, err=...) at /work/source/kdepim/libkleo/backends/qgpgme/threadedjobmixin.cpp:59
#6 0x00007ffff7d171f6 in generate_key(GpgME::Context*, QString const&) (ctx=0xc78050, parameters=...) at /work/source/kdepim/libkleo/backends/qgpgme/qgpgmekeygenerationjob.cpp:61
#7 0x00007ffff7d1706d in boost::_bi::list2<boost::arg<1>, boost::_bi::value<QString> >::operator()<boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error>, boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error> (*)(GpgME::Context*, QString const&), boost::_bi::list1<GpgME::Context*&> >(boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> (*&)(GpgME::Context*, QString const&), boost::_bi::list1<GpgME::Context*&>&, long) (this=this@entry=0x1209f90, f=@0x1209f88: 0x7ffff7d17130 <generate_key(GpgME::Context*, QString const&)>, a=...) at /usr/include/boost/bind/bind.hpp:303
#8 0x00007ffff7d181cb in boost::_bi::bind_t<boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> (*)(GpgME::Context*, QString const&), boost::_bi::list2<boost::arg<1>, boost::_bi::value<QString> > >::operator()<GpgME::Context*>(GpgME::Context*&) (this=0x1209f88, a1=@0x1209f98: 0xc78050) at /usr/include/boost/bind/bind_template.hpp:32
#9 0x00007ffff7d170ab in boost::_bi::list1<boost::_bi::value<GpgME::Context*> >::operator()<boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error>, boost::_bi::bind_t<boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error>, boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error> (*)(GpgME::Context*, QString const&), boost::_bi::list2<boost::arg<1>, boost::_bi::value<QString> > >, boost::_bi::list0>(boost::_bi::bind_t<boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> (*)(GpgME::Context*, QString const&), boost::_bi::list2<boost::arg<1>, boost::_bi::value<QString> > >&, long, boost::_bi::list0&) (this=<optimized out>, f=..., a=...) at /usr/include/boost/bind/bind.hpp:243
#10 0x00007ffff7d181f0 in boost::_bi::bind_t<boost::_bi::unspecified, boost::_bi::bind_t<boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> (*)(GpgME::Context*, QString const&), boost::_bi::list2<boost::arg<1>, boost::_bi::value<QString> > >, boost::_bi::list1<boost::_bi::value<GpgME::Context*> > >::operator()() (this=<optimized out>) at /usr/include/boost/bind/bind_template.hpp:20
#11 0x00007ffff7d18209 in boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<boost::_bi::unspecified, boost::_bi::bind_t<boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> (*)(GpgME::Context*, QString const&), boost::_bi::list2<boost::arg<1>, boost::_bi::value<QString> > >, boost::_bi::list1<boost::_bi::value<GpgME::Context*> > >, boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >::invoke(boost::detail::function::function_buffer&) (function_obj_ptr=...) at /usr/include/boost/function/function_template.hpp:132
#12 0x00007ffff7d183df in boost::function0<boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >::operator()() const (this=this@entry=0x1209f80) at /usr/include/boost/function/function_template.hpp:767
#13 0x00007ffff7d184eb in Kleo::_detail::Thread<boost::tuples::tuple<GpgME::KeyGenerationResult, QByteArray, QString, GpgME::Error, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >::run() (this=0x1209f68) at /work/source/kdepim/libkleo/backends/qgpgme/threadedjobmixin.h:103
#14 0x000000322127c41f in QThreadPrivate::start(void*) (arg=0x1209f68) at thread/qthread_unix.cpp:349
#15 0x0000003e9540752a in start_thread (arg=0x7fffd7fff700) at pthread_create.c:310
#16 0x0000003e9590022d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7fffe6e1c700 (LWP 25822)):
#0 0x0000003e958f4c8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x0000003220249b34 in g_main_context_iterate (priority=0x7fffffff, n_fds=0x2, fds=0x7fffe0003460, timeout=0xffffffff, context=0x7fffe00009a0) at gmain.c:4076
#2 0x0000003220249b34 in g_main_context_iterate (context=context@entry=0x7fffe00009a0, block=block@entry=0x1, dispatch=dispatch@entry=0x1, self=<optimized out>) at gmain.c:3776
#3 0x0000003220249c4c in g_main_context_iteration (context=0x7fffe00009a0, may_block=0x1) at gmain.c:3842
#4 0x00000032213b555e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffe00008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#5 0x0000003221384d81 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffe6e1bcc0, flags=...) at kernel/qeventloop.cpp:149
#6 0x00000032213850e5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffe6e1bcc0, flags=...) at kernel/qeventloop.cpp:204
#7 0x0000003221279bb9 in QThread::exec() (this=this@entry=0xbd3860) at thread/qthread.cpp:538
#8 0x00000032213656e3 in QInotifyFileSystemWatcherEngine::run() (this=0xbd3860) at io/qfilesystemwatcher_inotify.cpp:265
#9 0x000000322127c41f in QThreadPrivate::start(void*) (arg=0xbd3860) at thread/qthread_unix.cpp:349
#10 0x0000003e9540752a in start_thread (arg=0x7fffe6e1c700) at pthread_create.c:310
#11 0x0000003e9590022d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7fffe5b44700 (LWP 25834)):
#0 0x0000003e958f4c8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00000032213b2630 in qt_safe_poll(pollfd*, int, int, bool) (timeout=0xffffffff, nfds=0x1, __fds=0x7fffe5b43d20) at /usr/include/bits/poll2.h:46
#2 0x00000032213b2630 in qt_safe_poll(pollfd*, int, int, bool) (fds=fds@entry=0x7fffe5b43d20, nfds=nfds@entry=0x1, timeout_ms=timeout_ms@entry=0xffffffff, retry_eintr=retry_eintr@entry=0x0) at kernel/qcore_unix.cpp:117
#3 0x0000003221361e88 in QProcessManager::run() (this=0x32216ee5e0 <processManager()::processManager>) at io/qprocess_unix.cpp:263
#4 0x000000322127c41f in QThreadPrivate::start(void*) (arg=0x32216ee5e0 <processManager()::processManager>) at thread/qthread_unix.cpp:349
#5 0x0000003e9540752a in start_thread (arg=0x7fffe5b44700) at pthread_create.c:310
#6 0x0000003e9590022d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fffe51d3700 (LWP 25905)):
#0 0x0000003e958f4c8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x0000003220249b34 in g_main_context_iterate (priority=0x7fffffff, n_fds=0x2, fds=0x7fffd0003b20, timeout=0xffffffff, context=0x7fffd00026c0) at gmain.c:4076
#2 0x0000003220249b34 in g_main_context_iterate (context=context@entry=0x7fffd00026c0, block=block@entry=0x1, dispatch=dispatch@entry=0x1, self=<optimized out>) at gmain.c:3776
#3 0x0000003220249c4c in g_main_context_iteration (context=0x7fffd00026c0, may_block=0x1) at gmain.c:3842
#4 0x00000032213b555e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffd000bf50, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#5 0x0000003221384d81 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffe51d2cc0, flags=...) at kernel/qeventloop.cpp:149
#6 0x00000032213850e5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffe51d2cc0, flags=...) at kernel/qeventloop.cpp:204
#7 0x0000003221279bb9 in QThread::exec() (this=this@entry=0xad90f0) at thread/qthread.cpp:538
#8 0x00000032213656e3 in QInotifyFileSystemWatcherEngine::run() (this=0xad90f0) at io/qfilesystemwatcher_inotify.cpp:265
#9 0x000000322127c41f in QThreadPrivate::start(void*) (arg=0xad90f0) at thread/qthread_unix.cpp:349
#10 0x0000003e9540752a in start_thread (arg=0x7fffe51d3700) at pthread_create.c:310
#11 0x0000003e9590022d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fffe661b700 (LWP 25906)):
#0 0x0000003e958f6ae3 in select () at ../sysdeps/unix/syscall-template.S:81
#1 0x0000003067c27db9 in _gpgme_ath_select (nfd=nfd@entry=0x14, rset=rset@entry=0x7fffe661a5c0, wset=wset@entry=0x7fffe661a640, eset=eset@entry=0x0, timeout=timeout@entry=0x7fffe661a5b0) at ath-pthread.c:153
#2 0x0000003067c23de7 in _gpgme_io_select (fds=0x7fffd8003480, nfds=0xa, nonblock=nonblock@entry=0x0) at posix-io.c:590
#3 0x0000003067c0aade in _gpgme_wait_on_condition (ctx=ctx@entry=0x7fffd8003f50, cond=cond@entry=0x0, op_err_p=op_err_p@entry=0x7fffe661a794) at wait-private.c:87
#4 0x0000003067c0acba in _gpgme_wait_one_ext (ctx=ctx@entry=0x7fffd8003f50, op_err=op_err@entry=0x7fffe661a794) at wait-private.c:179
#5 0x0000003067c15c75 in gpgme_op_assuan_transact_ext (ctx=ctx@entry=0x7fffd8003f50, command=command@entry=0x631dcf "SCD SERIALNO", data_cb=data_cb@entry=0x7ffff781cc10 <GpgME::assuan_transaction_data_callback(void*, void const*, size_t)>, data_cb_value=data_cb_value@entry=0x7fffd8003ab0, inq_cb=inq_cb@entry=0x7ffff7820730 <GpgME::assuan_transaction_inquire_callback(void*, char const*, char const*, gpgme_data_t*)>, inq_cb_value=inq_cb_value@entry=0x7fffd8001330, status_cb=0x7ffff781f300 <GpgME::assuan_transaction_status_callback(void*, char const*, char const*)>, status_cb_value=0x7fffd8003ab0, op_err_p=0x0) at opassuan.c:138
#6 0x0000003067c15f2d in gpgme_op_assuan_transact (ctx=0x7fffd8003f50, command=0x631dcf "SCD SERIALNO", data_cb=0x7ffff781cc10 <GpgME::assuan_transaction_data_callback(void*, void const*, size_t)>, data_cb_value=0x7fffd8003ab0, inq_cb=0x7ffff7820730 <GpgME::assuan_transaction_inquire_callback(void*, char const*, char const*, gpgme_data_t*)>, inq_cb_value=0x7fffd8001330, status_cb=0x7ffff781f300 <GpgME::assuan_transaction_status_callback(void*, char const*, char const*)>, status_cb_value=0x7fffd8003ab0) at opassuan.c:226
#7 0x00007ffff7820125 in GpgME::Context::assuanTransact(char const*, std::auto_ptr<GpgME::AssuanTransaction>) (this=this@entry=0x7fffd8004160, command=command@entry=0x631dcf "SCD SERIALNO", transaction=...) at /work/source/kdepimlibs/gpgme++/context.cpp:807
#8 0x00007ffff7820201 in GpgME::Context::assuanTransact(char const*) (this=0x7fffd8004160, command=command@entry=0x631dcf "SCD SERIALNO") at /work/source/kdepimlibs/gpgme++/context.cpp:791
#9 0x00000000005bb511 in gpgagent_transact(boost::shared_ptr<GpgME::Context>&, char const*, GpgME::Error&) (gpgAgent=..., command=command@entry=0x631dcf "SCD SERIALNO", err=...) at /work/source/kdepim/kleopatra/smartcard/readerstatus.cpp:222
#10 0x00000000005bb71a in gpgagent_data(boost::shared_ptr<GpgME::Context>&, GpgME::Error&, char const*) (gpgAgent=..., err=..., what=0x631dcf "SCD SERIALNO") at /work/source/kdepim/kleopatra/smartcard/readerstatus.cpp:279
#11 0x00000000005bbc99 in get_card_status(QString const&, boost::shared_ptr<GpgME::Context>&, unsigned int) (fileName="/home/chrigi/.gnupg/reader_0.status", gpg_agent=..., idx=0x0) at /work/source/kdepim/kleopatra/smartcard/readerstatus.cpp:315
#12 0x00000000005bc290 in update_cardinfo(QString const&, boost::shared_ptr<GpgME::Context>&) (gnupgHomePath="/home/chrigi/.gnupg", gpgAgent=...) at /work/source/kdepim/kleopatra/smartcard/readerstatus.cpp:386
#13 0x00000000005bc563 in (anonymous namespace)::ReaderStatusThread::run() (this=0xaebc50) at /work/source/kdepim/kleopatra/smartcard/readerstatus.cpp:579
#14 0x000000322127c41f in QThreadPrivate::start(void*) (arg=0xaebc50) at thread/qthread_unix.cpp:349
#15 0x0000003e9540752a in start_thread (arg=0x7fffe661b700) at pthread_create.c:310
#16 0x0000003e9590022d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7ffff176d8c0 (LWP 25813)):
#0 0x0000003e958f4c8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x0000003220249b34 in g_main_context_iterate (priority=0x7fffffff, n_fds=0x3, fds=0xba5360, timeout=0x183, context=0x9d2540) at gmain.c:4076
#2 0x0000003220249b34 in g_main_context_iterate (context=context@entry=0x9d2540, block=block@entry=0x1, dispatch=dispatch@entry=0x1, self=<optimized out>) at gmain.c:3776
#3 0x0000003220249c4c in g_main_context_iteration (context=0x9d2540, may_block=0x1) at gmain.c:3842
#4 0x00000032213b555e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x939c00, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#5 0x000000322266b176 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#6 0x0000003221384d81 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffcb40, flags=...) at kernel/qeventloop.cpp:149
#7 0x00000032213850e5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffcb40, flags=...) at kernel/qeventloop.cpp:204
#8 0x000000322138a7c9 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1225
#9 0x00000032225c639c in QApplication::exec() () at kernel/qapplication.cpp:3823
#10 0x000000000045deea in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /work/source/kdepim/kleopatra/main.cpp:320
gdb$

knauss moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Aug 17 2015, 9:26 AM

I can't reprocuce this on docker. When trying to crate a smime so far I see the bug, that gpgsm can't create a key

gpgsm[639]: chan_20 <- GENKEY
2015-08-17 11:54:46 gpgsm[639] line 4: unknown keyword
2015-08-17 11:54:46 gpgsm[639] error creating certificate request: General error <GpgSM>
gpgsm[639]: chan_20 -> ERR 50331649 General error <GpgSM>

I can reporduce the bug in creating certificates with my local system:

$ gpgsm --gen-key
gpgsm (GnuPG) 2.0.28; Copyright (C) 2015 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpgsm: enabled debug flags: x509 mpi crypto memory cache memstat hashing assuan
Please select what kind of key you want:
   (1) RSA
   (2) Existing key
   (3) Existing key from card
Your selection? 1
What keysize do you want? (2048) 
Requested keysize is 2048 bits
Possible actions for a RSA key:
   (1) sign, encrypt
   (2) sign
   (3) encrypt
Your selection? 1
Enter the X.509 subject name: CN=test
Enter email addresses (end with an empty line):
> sdfgsdg@test.de
> 
Enter DNS names (optional; end with an empty line):
> 
Enter URIs (optional; end with an empty line):
> 
Parameters to be used for the certificate request:
    Key-Type: RSA
    Key-Length: 2048
    Key-Usage: sign, encrypt
    Name-DN: CN=test
    Name-Email: sdfgsdg@test.de

Really create request? (y/N) y
Now creating certificate request.  This may take a while ...
gpgsm: DBG: connection to agent established
gpgsm: about to sign CSR for key: &2B76EFEE549CFE06D606C2E239542CA06F762DCD
Ohhhh jeeee: ... this is a bug (md.c:809:md_read)
Abgebrochen

And also with docker ( it takes long for creating keys)... (client john)

$ gpgsm --server
# Home: ~/.gnupg
# Config: /home/developer/.gnupg/gpgsm.conf
# AgentInfo: /home/developer/.gnupg/S.gpg-agent:5197:1
# DirmngrInfo: [not set]
OK GNU Privacy Guard's S/M server 2.0.28 ready
INPUT FD=1
OK
OUTPUT FD=2
OK
GENKEY
key-type:      RSA
key-length:    2048
name-email:    test@test.de
name-dn:       CN=asdf asdf,O=asdf,C=asdf
<Ctrl+D>
Ohhhh jeeee: ... this is a bug (md.c:809:md_read)
Aborted

<Ctrl+D> is needed to end the input

My summary in that is that the GENKEY is broken with gpgsm in upstream :( But also kleopatra has problems getting connected to gpgsm correctly. The logs of kleopatra creating keys looks correct but supricingly gpgsm awnsers with command not found:

kleopatra connection:

2015-08-17 16:50:15 gpgsm[5265] enabled debug flags: x509 crypto cache assuan
gpgsm[5265]: chan_19 -> # Home: ~/.gnupg
gpgsm[5265]: chan_19 -> # Config: /home/developer/.gnupg/gpgsm.conf
gpgsm[5265]: chan_19 -> # AgentInfo: /home/developer/.gnupg/S.gpg-agent:5197:1
gpgsm[5265]: chan_19 -> # DirmngrInfo: [not set]
gpgsm[5265]: chan_19 -> OK GNU Privacy Guard's S/M server 2.0.28 ready
gpgsm[5265]: chan_19 <- OPTION display=:0
gpgsm[5265]: chan_19 -> OK
gpgsm[5265]: chan_19 <- OPTION ttyname=/dev/console
gpgsm[5265]: chan_19 -> OK
gpgsm[5265]: chan_19 <- OPTION ttytype=xterm
gpgsm[5265]: chan_19 -> OK
gpgsm[5265]: chan_19 <- OPTION enable-audit-log=1
gpgsm[5265]: chan_19 -> OK
gpgsm[5265]: chan_19 <- # descriptor 15 is in flight
gpgsm[5265]: chan_19 <- INPUT FD
gpgsm[5265]: chan_19 -> OK
gpgsm[5265]: chan_19 <- # descriptor 19 is in flight
gpgsm[5265]: chan_19 <- OUTPUT FD
gpgsm[5265]: chan_19 -> OK
gpgsm[5265]: chan_19 <- GENKEY
2015-08-17 16:50:15 gpgsm[5265] line 4: unknown keyword
2015-08-17 16:50:15 gpgsm[5265] error creating certificate request: General error <GpgSM>
gpgsm[5265]: chan_19 -> ERR 50331649 General error <GpgSM>
gpgsm[5265]: chan_19 <- BYE
gpgsm[5265]: chan_19 -> OK closing connection

console connection:

2015-08-17 16:42:52 gpgsm[5200] enabled debug flags: x509 crypto cache assuan
gpgsm[5200]: chan_4 -> # Home: ~/.gnupg
gpgsm[5200]: chan_4 -> # Config: /home/developer/.gnupg/gpgsm.conf
gpgsm[5200]: chan_4 -> # AgentInfo: /home/developer/.gnupg/S.gpg-agent:5197:1
gpgsm[5200]: chan_4 -> # DirmngrInfo: [not set]
gpgsm[5200]: chan_4 -> OK GNU Privacy Guard's S/M server 2.0.28 ready
gpgsm[5200]: chan_4 <- INPUT FD=1
gpgsm[5200]: chan_4 -> OK
gpgsm[5200]: chan_4 <- OUTPUT FD=2
gpgsm[5200]: chan_4 -> OK
gpgsm[5200]: chan_4 <- GENKEY
gpgsm[5200]: chan_7 <- OK Pleased to meet you, process 5200
2015-08-17 16:43:23 gpgsm[5200] DBG: connection to agent established

I guess we don't strictly need the capability to create new keys, as long as we can work with existing ones. Also, any idea whether this depends on a specific version or is universally broken?

knauss lowered the priority of this task from Unbreak Now! to 60.Aug 18 2015, 8:32 AM

In comanies users do not create their certificate own their own.

Also, any idea whether this depends on a specific version or is universally broken?

well I see this issue over all distros/windows I used, so I think it is a gerneral problem. We should repot is upstream.

knauss moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Aug 18 2015, 8:40 AM

Generating a cert with gpgsm works for me with version 2.0.22 on Ubuntu 14.04.

petersen added a project: Restricted Project.Aug 18 2015, 9:49 AM
mollekopf lowered the priority of this task from 60 to 40.Aug 18 2015, 11:46 AM

Low priority because we normally don't need to create new certificates.

Anwser from upstream:

This is a regression in 2.0.28. The fix is
commit 35d3ced4fda90a5410a579850ca92ea6a356b402 
which reverts to use SHA-1 for a CSR.

It works fine in 2.1 but backporting the changes is not planned.

--> we should not use 2.0.28

knauss moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Aug 25 2015, 11:42 AM

We don't do anything here - we should simply make sure not to use the version on windows...