Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
extract-pem(1)		    General Commands Manual		extract-pem(1)

NAME
       extract-pem -- Extract blocks of	PEM files into separate	files

SYNOPSIS
       extract-pem pem_file [...]
		   [-o file_name_prefix	| --output-prefix file_name_prefix]
		   [-1	 |   --only-first-entry]   [-f	|  --skip-first-entry]
		   [-l | --skip-last-entry]
		   [-q | --quiet]
       extract-pem [-h | --help]

DESCRIPTION
       extract-pem xtracts the blocks of PEM files into	 separate  files.  The
       output  files  will be named with a given output	prefix (default: "out-
       put-"), and a sequential	number according to the	occurrence. The	output
       file extension will be chosen based on the content:

       * .crt for a certificate,

       * .crl for a certificate	revokation list	(CRL),

       * .key for a key.

ARGUMENTS
       The following options are available:

       pem_file	[...]
	       Specifies one ore more PEM files	to be extracted.

       -o file_name_prefix | --output-prefix file_name_prefix
	       Sets the	output file prefix (default: "output-").

       -1 | --only-first-entry
	       Extract only the	first entry (i.e. extract the  certificate  of
	       e.g.  a server itself, if the PEM file contains a chain of cer-
	       tificates).

       -f | --skip-first-entry
	       Do not extract the first	entry (i.e. do not  extract  the  cer-
	       tificate	 of  e.g.  a server itself, if the PEM file contains a
	       chain of	certificates).

       -l | --skip-last-entry
	       Do not extract the last entry (i.e. do not extract the certifi-
	       cate of the root	CA, if the PEM file contains a chain  of  cer-
	       tificates).

       -q | --quiet
	       Quiet mode: only	print information in case of errors.

       -h | --help
	       Prints command-line parameters.

EXAMPLES
       extract-pem my-server-certificate.pem --output-prefix extract-

       extract-pem my-server-certificate.pem -o	extract-

       extract-pem	   my-server-certificate.pem	    --skip-first-entry
	       --skip-last-entry -o extract-intermediate-

       extract-pem     my-server-certificate.pem     --only-first-entry	    -o
	       extract-server-

       extract-pem --help

       extract-pem -h

extract-pem		       November	28, 2025		extract-pem(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=extract-pem&sektion=1&manpath=FreeBSD+Ports+15.0.quarterly>

home | help