Opened 3 years ago

Closed 3 years ago

#63795 closed defect (fixed)

privoxy: sh: line 18: unexpected EOF while looking for matching `''

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: essandess (Steve Smith)
Priority: Normal Milestone:
Component: ports Version: 2.7.99
Keywords: Cc:
Port: privoxy

Description

Failed to activate privoxy on my High Sierra system:

Generating RSA private key, 2048 bit long modulus (2 primes)
....+++++
.........................................+++++
e is 65537 (0x010001)
certs/ca.cert.pem: OK
sh: line 18: unexpected EOF while looking for matching `''
sh: line 19: syntax error: unexpected end of file
Command failed: sh <<TLS_PRIVOXY_ROOT_CA
            # initialize
            touch index.txt
            echo 1000 > serial

            # CA encrypted key
            openssl genrsa -aes256 -out private/ca.key.pem \
                -passout file:private/passphrase.txt
            chmod go-rw private/ca.key.pem

            # CA certificate
            openssl req -config openssl.cnf \
                -new -x509 -days 1460 -sha256 \
                -extensions v3_ca \
                -out certs/ca.cert.pem -key private/ca.key.pem \
                -passin file:private/passphrase.txt -batch

            # CA certificate openssl self-verification
            openssl verify -CAfile certs/ca.cert.pem certs/ca.cert.pem

            # Convert to .cer DER and .p12 for other uses
            openssl x509 -outform der -in certs/ca.cert.pem -out certs/ca.cer

            openssl pkcs12 -export -out certs/ca.p12 \
                -inkey private/ca.key.pem -in certs/ca.cert.pem \
                -passin file:private/passphrase.txt \
                -passout pass:$'refroze2'octagon-Jules0;elisions'
TLS_PRIVOXY_ROOT_CA

Exit code: 2

Change History (2)

comment:1 Changed 3 years ago by essandess (Steve Smith)

It’s either a bug or a feature that, unlike other openssl functions, openssl-pkcs12 needs a newline in its -passout file.

I adopted the Portfile to this behavior, which will avoid the issue encountered in this ticket: using pass: with an unescaped tcl character in the passphrase, ; in this case.

Please see https://github.com/macports/macports-ports/pull/12804.

comment:2 Changed 3 years ago by essandess (Steve Smith)

Resolution: fixed
Status: assignedclosed

In 55a587a5bec93fef6adbf4a0c70ea15e94de514d/macports-ports (master):

privoxy: Bugfix

Note: See TracTickets for help on using tickets.