In order to support HTTPS, the device needs to be configured with an Identity certificate. This task generates the key pair, then configures the trust points and certificates required for HTTPS security.
When the Apache (web server) boots. it enables HTTPS service only in the presence of HTTPS crypto certificates.
HTTP and HTTPS are mutually exclusive.
device#configure terminal
device(config)# crypto key label k1 rsa modulus 2048
device(config)# crypto ca trustpoint t1 device(config-ca-t1)#
device(config-ca-t1)# keypair k1
device(config-ca-t1)# end
device# crypto ca authenticate t1 cert-type https protocol SCP host 10.70.12.102 user fvt directory /users/home/ crypto file cacert.pem Password: **********
device# crypto ca enroll t1 cert-type htttps country US state CA locality SJ organization BRC orgunit SFI common myhost.extreme.com protocol SCP host 10.70.12.102 user fvt directory /users/home/crypto Password: **********
device# crypto ca import t1 certificate cert-type https protocol SCP host 10.70.12.102 user fvt directory /users/ home/crypto file swcert.pem Password: **********
device# show crypto ca certificates Trustpoint: t1 certificate: SHA1 Fingerprint=B7:5B:DB:9B:24:69:40:39:36:66:4D:59:2C:69:83:8E:93:CA:23:0C Subject: C=US, ST=CA, L=SJ, O=BRC, OU=SFI, CN=10:00:00:27:F8:87:70:29 Issuer: C=US, ST=CA, L=SJ, O=BR, OU=SF, CN=SOUND/emailAddress=sravi Not Before: Oct 6 23:44:27 2014 GMT Not After : Oct 6 23:44:27 2015 GMT purposes: sslserver CA certificate: SHA1 Fingerprint=76:5B:D4:2C:CB:54:FE:6B:C5:E0:E3:FD:11:B0:88:70:80:12:C6:63 Subject: C=US, ST=CA, L=SJ, O=BR, OU=SF, CN=SOUND/emailAddress=sravi Issuer: C=US, ST=CA, L=SJ, O=BR, OU=SF, CN=SOUND/emailAddress=sravi Not Before: Sep 19 20:56:49 2014 GMT Not After : Oct 19 20:56:49 2014 GMT purposes: sslserver device# show running-config crypto crypto key label k1 rsa modulus 2048 crypto ca trustpoint t1 keypair k1
If HTTP is in an enabled state (by default HTTP is enabled), then execute the http server command to shutdown the service, followed by no http server command to enable HTTPS.