For some fields there will be a default value, If you enter '.', the field will be left
blank.
-----
Country Name (2 letter code) [GB]:US
State or Province Name (full name) [Berkshire]:California
Locality Name (eg, city) [Newbury]:San Jose
Organization Name (eg, company) [My Company Ltd]:Cisco Systems, Inc.
Organizational Unit Name (eg, section) []:DEPT_ACCT
Common Name (eg, your name or your server's hostname) []:Jane
Email Address []:[email protected]
Host% ls -l
total 24
-rw-r--r--
1 janedoe eng12
1659 Jun 12 15:01 cert.pem
-rw-r--r--
1 janedoe eng12
1679 Jun 12 14:55 privkey.pem
-rw-r--r--
1 janedoe eng12
451 Jun 12 14:57 pubkey.pem
Signing the Tcl Scripts Example
The following example shows how to sign the Tcl scripts:
Host% openssl smime -sign -in hello -out hello.pk7 -signer cert.pem -inkey privkey.pem
-outform DER -binary
Host% ls -l
total 40
-rw-r--r--
1 janedoe eng12
1659 Jun 12 15:01 cert.pem
-rw-r--r--
1 janedoe eng12
115 Jun 13 10:16 hello
-rw-r--r--
1 janedoe eng12
1876 Jun 13 10:16 hello.pk7
-rw-r--r--
1 janedoe eng12
1679 Jun 12 14:55 privkey.pem
-rw-r--r--
1 janedoe eng12
451 Jun 12 14:57 pubkey.pem
Verifying the Signature Example
The following example shows how to verify the signature:
Host% openssl smime -verify -in hello.pk7 -CAfile cert.pem -inform DER -content hello
puts hello
puts "argc = $argc"
puts "argv = $argv"
puts "argv0 = $argv0"
puts "tcl_interactive = $tcl_interactive"
Verification successful
Converting the Signature with Nonbinary Data Example
The following example shows how to convert the Tcl signature with nonbinary data:
#Cisco Tcl Signature V1.0
Then append the signature file to the end of the file.
Host% xxd -ps hello.pk7 > hello.hex
Host% cat my_append
#!/usr/bin/env expect
set my_first {#Cisco Tcl Signature V1.0}
set newline {}
set my_file [lindex $argv 0]
set my_new_file ${my_file}_sig
set my_new_handle [open $my_new_file w]
set my_handle [open $my_file r]
puts $my_new_handle $newline
puts $my_new_handle $my_first
foreach line [split [read $my_handle] "\n"]
{
set new_line {#}
append new_line $line
puts $my_new_handle $new_line
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1841
Configuration Examples for Signed Tcl Script
Summary of Contents for Catalyst 2960 Series
Page 96: ......
Page 196: ......
Page 250: ......
Page 292: ......
Page 488: ......
Page 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Page 590: ......
Page 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Page 620: ......
Page 750: ......
Page 1604: ......
Page 1740: ......
Page 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Page 2106: ......
Page 2118: ......
Page 2164: ......