4

If I execute

openssl x509 -in ./somecert -text | grep SCTs

I get the expected output. If I use grep -q

openssl x509 -in ./somecert -text | grep -q SCTs

I get

unable to write certificate
139863258654608:error:09072007:PEM routines:PEM_write_bio:BUF lib:pem_lib.c:659:

It seems that grep is not accepting the pipe input ...

What did I miss?

1 Answer 1

12

grep is accepting the pipe input, there is no option to reject it.

What happens here is that grep -q will close the input pipe as soon it finds the pattern. The messages are from openssl because it can't write to the pipe once it's closed.

In this case, you should add -noout to the openssl options to disable writing the certificate.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .