Converting The Signature Into Nonbinary Data - Cisco Catalyst 2960 series Configuration Manual

Consolidated platform configuration guide, ios release 15.2(4)e
Hide thumbs Also See for Catalyst 2960 series:
Table of Contents

Advertisement

How to Configure Signed Tcl Scripts
Example:
Host% ls -l
total 40
-rw-r--r--
-rw-r--r--
-rw-r--r--
-rw-r--r--
-rw-r--r--
The hello file contains the content detached from the signed Tcl file hello.pk7 by running the openssl smime command
with the -verify keyword. If the verification was successful, the signer's certificates are written to the X.509 certificate
in the cert.pem file.

Converting the Signature into Nonbinary Data

Perform this task to convert the signature from binary to nonbinary data.
SUMMARY STEPS
1. xxd -ps signed-tcl-file > nonbinary-signature-file
2. Create a script that displays #Cisco Tcl Signature V1.0 in the first line andinserts a comment character
(#) at the beginning of each line of the input file and writes each line to a file whose name is formed by
appending the text string "_sig" to the name of the input file.
3. Run the script, supplying the name of the file containing the nonbinary signature file
(nonbinary-signature-file) as the input argument.
4. ls -l
5. cat signed-tcl-file commented-nonbinary-signature-file > signed-tcl-script
6. cat signed-tcl-script
DETAILED STEPS
Step 1
xxd -ps signed-tcl-file > nonbinary-signature-file
This command converts the signature in signed-tcl-file from binary to nonbinary data and stores it as a hexadecimal
dump in the file nonbinary-signature-file.
Example:
Host% xxd -ps hello.pk7 > hello.hex
Step 2
Create a script that displays #Cisco Tcl Signature V1.0 in the first line andinserts a comment character (#) at the beginning
of each line of the input file and writes each line to a file whose name is formed by appending the text string "_sig" to
the name of the input file.
In this example the cat command is used to display the contents of the script file named my_append.
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1832
1 janedoe eng12
1659 Jun 13 10:18 cert.pem
1 janedoe eng12
115 Jun 13 10:17 hello
1 janedoe eng12
1876 Jun 13 10:16 hello.pk7
1 janedoe eng12
1679 Jun 12 14:55 privkey.pem
1 janedoe eng12
451 Jun 12 14:57 pubkey.pem

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents