Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138275 - cups-1.2.1-r2 hangs when creating ssl server keys
Summary: cups-1.2.1-r2 hangs when creating ssl server keys
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-27 15:26 UTC by Jari-Matti Mäkelä
Modified: 2007-02-15 03:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jari-Matti Mäkelä 2006-06-27 15:26:51 UTC
Portage 2.1.1_pre1-r3 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.3.5-r3, 2.6.17-gentoo i686)
=================================================================
System uname: 2.6.17-gentoo i686 Pentium III (Coppermine)
Gentoo Base System version 1.12.1
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=pentium3 -mmmx"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -pipe -march=pentium3 -mmmx"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.linux.ee/pub/gentoo/distfiles/ http://ftp.du.se/pub/os/gentoo http://ftp.linux.ee/pub/gentoo/distfiles/"
LANG="fi_FI.UTF-8"
LC_ALL="fi_FI.UTF-8"
LINGUAS="fi"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 7zip acpi apache apache2 apm bash-completion berkdb bindist bitmap-fonts bzip2 calendar cgi clamav cli crypt cups dedicated dio eds emboss encode enscript expat fam fastcgi flac foomaticdb force-cgi-redirect fortran ftp gd gdbm gif gmp gnutls gphoto2 hal hardened hardenedphp howl iconv icq idea idn imap imlib ipv6 isdnlog jabber java javascript jikes jpeg kerberos ldap libcaca libg++ libwww lirc lm_sensors ls lua mad maildir memlimit mikmod milter mime mmx mng mp3 msn mysql mysqli ncurses nls nptl nptlonly odbc ogg oggvorbis oss pam pcntl pcre pda pdflib perl php png ppds pppd python quicktime readline reflection ruby sasl sdl session silvercity slp snmp sockets speex spell spl sqlite sqlite3 ssl svg symlink szip tcpd tetex threads tidy tiff tokenizer truetype truetype-fonts type1-fonts unicode usb userlocales utf8 vhosts vorbis webdav wmf xml xml2 xorg xsl yahoo zlib elibc_glibc kernel_linux linguas_fi userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jari-Matti Mäkelä 2006-06-27 15:42:55 UTC
This error occurs every time I try to administrate the printing server. Both localhost and remote access hangs. Web page says:

426 Upgrade Required
You must access this page using the URL https://x.x.x.x:631/admin/?op=set-printer-options&printer_name=x.

cups log says:
I [28/Jun/2006:01:29:35 +0300] Listening to /var/run/cups/cups.sock on fd 2...
I [28/Jun/2006:01:29:45 +0300] Generating server key...

It simply hangs and does not continue.

People here
https://launchpad.net/distros/ubuntu/dapper/+source/cupsys/+bug/44931
say that I should create the keys manually. Well, I created them, but it still won't work. Setting permissions doesn't work since they're reset when cupsd is restarted. I also tried this:

http://www.ubuntuforums.org/archive/index.php/t-185987.html

But without any luck.

Tried to compile without gnutls and ssl, but then the server is not able to serve any content:

I [28/Jun/2006:01:22:14 +0300] Listening to /var/run/cups/cups.sock on fd 2...
E [28/Jun/2006:01:22:16 +0300] encrypt_client: Unable to encrypt connection from 192.168.0.1!
E [28/Jun/2006:01:22:16 +0300] encrypt_client: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher
E [28/Jun/2006:01:22:19 +0300] encrypt_client: Unable to encrypt connection from 192.168.0.1!
E [28/Jun/2006:01:22:19 +0300] encrypt_client: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher
E [28/Jun/2006:01:22:22 +0300] encrypt_client: Unable to encrypt connection from 192.168.0.1!
E [28/Jun/2006:01:22:22 +0300] encrypt_client: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher
Comment 2 Jari-Matti Mäkelä 2006-06-27 15:56:03 UTC
Ok, now I got it working (I guess - needs a bit more testing, though). I needed to manually set the paths to certificate and private key. Also gnutls USE flag is needed.

/etc/cups.d/cupsd.conf diff:
+ ServerKey /etc/cups/ssl/privkey.pem
+ ServerCertificate /etc/cups/ssl/server.crt

Any idea, why the default configuration does not work?
Comment 3 Bret Towe 2006-07-05 22:04:36 UTC
i also had to add gnutls and generate my own ssl keys
shouldnt the init.d do this since cups is bust?
and shouldnt ssl pull in gnutls since they seem to be intertwined?
Comment 4 Stefan Schweizer (RETIRED) gentoo-dev 2006-08-18 17:06:48 UTC
keys get generated automatically for me with USE=gnutls and ssl with cups-1.2.2


I have removed the gnutls useflag to avoid problems when it is not enabled. Thanks.
Comment 5 Pierre-Olivier Bouchard 2007-02-15 03:54:41 UTC
I'm still seeing this bug with 1.2.7.

I had to add the ServerKey and ServerCertificate lines, mkdir /etc/cups/ssl, and create the server.crt file manually.

Would it be possible to add this to the ebuild/init script? Or maybe remove the EncryptionRequired option in the "/admin" section in the default config?

Here is my config:

Portage 2.1.2-r9 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r4 i686)
=================================================================
System uname: 2.6.19-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.12.9
Timestamp of tree: Thu, 15 Feb 2007 02:59:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.20
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=pentium4 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://gentoo.mirrors.tds.net/gentoo ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://pandemonium.tiscali.de/pub/gentoo/ http://85.25.128.62 ftp://194.117.143.72/mirrors/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa arts berkdb bitmap-fonts bzip2 cairo cdr cli cracklib cups dbus dlloader dri dvd dvdr encode esd fam firefox gdbm gif hal iconv isdnlog javascript jpeg lame logrotate logwatch mad mmx mp3 mpeg mysql ncurses nptl nptlonly ogg opengl oss pam pch pcre pic png ppds pppd qt3 qt3support qt4 readline reflection samba session spl sse sse2 ssl swat tcpd truetype truetype-fonts type1-fonts userlocales vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


pixie ~ # emerge cups -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] net-print/cups-1.2.7  USE="X dbus jpeg pam png ppds samba slp ssl tiff -nls -php" 0 kB