Certutil tasks for encoding and decoding certificates

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Certutil tasks for encoding and decoding certificates

To encode a certificate as a base64 file

To decode a base64-encoded certificate

To decode a base64-encoded request to a DER-encoded request

To decode a DER-encoded request to a base64-encoded request

To encode a certificate as a hexadecimal file

To decode a hexadecimal-encoded file

To encode a certificate as a base64 file

Syntax

certutil -encode [-f] [-v] InFile OutFile

Parameters
  • -encode
    Encodes a certificate as a base64 file.
  • -f
    Overwrites existing files or keys.
  • -v
    Specifies verbose output.
  • InFile
    Specifies the certificate that you want to encode as a base64 file.
  • OutFile
    Specifies the base64-encoded file to which you want to send the certificate information.
  • -?
    Displays a list of certutil commands.

To decode a base64-encoded certificate

Syntax

certutil -decode [-f] [-v] InFileOutFile

Parameters
  • -decode
    Decodes a base64-encoded file.
  • -f
    Overwrites existing files or keys.
  • -v
    Specifies verbose output.
  • InFile
    Specifies the base64-encoded file that you want to decode.
  • OutFile
    Specifies the file to which you want to send the output.
  • -?
    Displays a list of certutil commands.

To decode a base64-encoded request to a DER-encoded request

Syntax

certutil -decode [-f] [-v] Base64Request**.req** DERrequest**.der**

Parameters
  • -decode
    Decodes a base64-encoded file.
  • -f
    Overwrites existing files or keys.
  • -v
    Specifies verbose output.
  • Base64Request .req
    Specifies the base64-encoded request that you want to decode.
  • DERrequest .der
    Specifies the DER-encoded request, which is compatible with Entrust, that you want to create.
  • -?
    Displays a list of certutil commands.

To decode a DER-encoded request to a base64-encoded request

Syntax

certutil -encode [-f] [-v] DERrequest**.der** Base64Request**.req**

Parameters
  • -encode
    Encodes a certificate as a base64 file.
  • -f
    Overwrites existing files or keys.
  • -v
    Specifies verbose output.
  • DERrequest .der
    Specifies the DER-encoded request, which is compatible with Entrust, that you want to decode.
  • Base64Request .req
    Specifies the base64-encoded request that you want to create.
  • -?
    Displays a list of certutil commands.

To encode a certificate as a hexadecimal file

Syntax

certutil -encodehex [-f] [-v] InFile OutFile

Parameters
  • -encodehex
    Encodes a certificate as a hexadecimal file.
  • -f
    Overwrites existing files or keys.
  • -v
    Specifies verbose output.
  • InFile
    Specifies the certificate that you want to encode as a hexadecimal file.
  • OutFile
    Specifies the hexadecimal file that you want to create.
  • -?
    Displays a list of certutil commands.

To decode a hexadecimal-encoded file

Syntax

certutil -decodehex [-f] [-v] InFile OutFile**.der**

Parameters
  • -decodehex
    Decodes a hexadecimal-encoded file.
  • -f
    Overwrites existing files or keys.
  • -v
    Specifies verbose output.
  • InFile
    Specifies the hexadecimal-encoded file that you want to decode.
  • OutFile .der
    Specifies the DER-encoded file to which you want to send the output.
  • -?
    Displays a list of certutil commands.

Formatting legend

Format Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

See Also

Concepts

Command-line reference A-Z
Command shell overview