Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Display values within a Public Key Infrastructure (PKI) object, convert the encoding of PKI objects, or encrypt and decrypt private keys.
viewcert [ options ] input-file
The input-file must be a DER- or PEM-encoded PKI object.
|-d||Use this option to DER-encode the output. This option is only useful with the -o option. It cannot be used with -p. By default, viewcert outputs the PKI object in a readable text format.|
|-ip input-password||If the input-file contains an encrypted private key, use this option to specify the password needed to decrypt it.|
|-o output-file||Use this option to specify the file that viewcert should write the output to. By default, viewcert writes the output to the console.|
|-op output-password||Use this option to specify the password viewcert should use to encrypt a private key. This option is only useful with -d or -p. By default, private keys are not encrypted.|
|-p||Use this option to PEM-encode the output. This option is only useful with the -o option. It cannot be used with -d. By default, viewcert outputs the PKI object in a readable text format.|
The viewcert utility can be used to view the following types of PKI objects:
Viewcert can also be used to convert between DER and PEM encoding types and to encrypt or decrypt private keys.
The viewcert utility supports RSA and ECC objects. To view ECC objects, you must order a separate license. See Separately licensed components.
The following example allows you to view the sample RSA certificate that is included with SQL Anywhere:
This example produces the following output:
SQL Anywhere X.509 Certificate Viewer Version 10.0.1.3330 X.509 Certificate ----------------- Common Name: RSA Root Organizational Unit: test Organization: test Locality: test State/Province: test Country Code: test Issuer: RSA Root Serial Number: 303031 Issued: Apr 15, 2002 12:53:51 Expires: Apr 16, 2022 12:53:51 Signature Algorithm: RSA, MD5 Key Type: RSA Key Size: 1024 bits Basic Constraints: Is a certificate authority, path length limit: 10 Key Usage: Certificate Signing, CRL Signing