The technician who sees the “Your connection isn’t private” warning on a camera’s web interface for the first time stops and reads it. By the tenth time, they don’t read it; they click “Proceed” straight away. That’s where the real risk starts: a fake certificate presented in a man-in-the-middle attack produces the same warning and is passed with the same click. Below, for people responsible for camera systems, we cover issuing certificates with an internal CA, the CSR and upload order, which protocol is really encrypted, verification with OpenSSL and how to track renewal, in the order we apply them on site.
Why HTTPS on cameras is often left incomplete
Most cameras come from the factory with either HTTP only or a self-signed certificate generated by the device itself. During commissioning, the priority is video and recording; HTTPS goes on the “we’ll look at it later” list and stays there. When auditing an existing camera network, the picture we usually find is this:
- HTTP (80) and HTTPS both open; HTTPS self-signed, users used to clicking through the warning.
- The VMS connects to cameras over HTTP. Even if the password goes with Digest, the rest of the session is clear text.
- The certificate’s subject name shows the camera’s old IP address; the address changed and nobody noticed.
- The NVR certificate was generated on the initial installation date and has expired; the mobile client shows a connection error and nobody knows why.
A self-signed certificate encrypts traffic but doesn’t prove who the device on the other end is. The client has no reference to tell the “right” certificate apart; another self-signed certificate presented by an attacker is accepted with the same warning. What’s missing isn’t encryption. What’s missing is a verifiable identity.
Self-signed, internal CA or public CA
| Option | Advantage | Limitation | Suitable scenario |
|---|---|---|---|
| Self-signed | No extra infrastructure needed | Identity can’t be verified, builds a habit of clicking through warnings | Only initial setup and the lab |
| Internal CA (AD CS, step-ca, etc.) | Certificates for internal domain names and IPs, validity under the organization’s control | The CA itself must be protected, and the root certificate distributed to clients | Corporate camera network, VMS and operator stations |
| Public CA | Trusted automatically by every browser | No certificates for private IPs and internal domains such as .local; validity periods are shrinking | Only an internet-facing VMS gateway or web client |
The camera network is a segment that should be closed to the internet; so the practical answer is almost always an internal CA. If there’s Active Directory, setting up a subordinate CA under AD CS with a separate template for camera certificates is the path with the least friction. Without AD, an open-source CA running with an offline root and an online subordinate CA does the job. There’s one rule: the root CA’s private key is never on any system in the camera network.
The maximum validity period of public CA certificates is being shortened step by step by CA/Browser Forum decisions. Manual renewal across hundreds of devices isn’t sustainable at this pace. With an internal CA, a one- or two-year validity for camera certificates is a reasonable starting point until the renewal process settles; it can be shortened as the process is automated.
Order of creating the CSR and uploading the certificate
1. Name and DNS first, then the certificate
A certificate is issued to a name; a device without a clear name can’t get a proper certificate. Give each camera a permanent DNS name (e.g. cam-b1-012.cctv.corp.local) and tie it to a DHCP reservation or static IP. The certificate should contain both this name and the IP address in the Subject Alternative Name (SAN) field. Modern browsers, Chrome first among them, don’t look at the CN field for name validation. A certificate without a SAN gives an error even if your CA is trusted; this is the most common cause of the complaint “we distributed the root certificate but the warning still appears”.
2. Where the private key will be generated
If the camera can generate a CSR on the device, choose this path: the private key never leaves the device. Some models keep the key in a secure element or TPM-like hardware. If the device can’t generate a CSR, you generate the key on the management server and upload it as a PKCS#12 bundle. In that case, securely delete the key files as soon as the job is done. A .key file forgotten on a desktop wastes all the effort. Besides device settings, decide which networks can access NVRs and cameras in a corporate network security and segmentation project.
# If the device can't generate a CSR: key + CSR with SAN (OpenSSL 1.1.1 and later)
openssl req -new -newkey rsa:2048 -nodes \
-keyout cam-b1-012.key -out cam-b1-012.csr \
-subj "/CN=cam-b1-012.cctv.corp.local" \
-addext "subjectAltName=DNS:cam-b1-012.cctv.corp.local,IP:10.20.30.12"
# Check the CSR contents
openssl req -in cam-b1-012.csr -noout -text
# Submit to AD CS (Web Server template or a camera-specific template)
certreq -submit -attrib "CertificateTemplate:WebServer" cam-b1-012.csr cam-b1-012.cer
# Combine key, certificate and chain into a single bundle
openssl pkcs12 -export -inkey cam-b1-012.key -in cam-b1-012.cer \
-certfile corp-ca-chain.pem -out cam-b1-012.p12
Check that the subject name in the AD CS template is set to “supply in the request”; otherwise the SAN in the CSR isn’t carried into the certificate, the certificate looks fine, but the browser still gives a name error. The second trap is OpenSSL 3.x: the PKCS#12 files it produces use stronger encryption by default, and some old camera firmware can’t read them. If the upload returns an “invalid file” error, you may need to repackage with the -legacy option; but consider a firmware update first.
3. Upload and enforce HTTPS
- First upload the corporate CA chain (root and subordinate CA) to the camera’s trusted CA store.
- Upload the device certificate and assign it to the HTTPS service.
- Switch the camera connection in the VMS to HTTPS and enable certificate validation; then test video, PTZ and the event stream one by one.
- Once everything works, disable HTTP or redirect it to HTTPS. If you disable HTTP without checking which port ONVIF uses, the VMS integration breaks silently.
- Set the minimum TLS version to TLS 1.2; if the firmware allows it, disable weak cipher suites.
This isn’t done by hand across hundreds of cameras. Many manufacturers’ device management software or HTTP API supports bulk certificate deployment; verify support per model and firmware and try it on a small pilot group first. A problem that doesn’t show up in the pilot shows up en masse in the field.
Which protocol is really encrypted: HTTP, RTSP, RTSPS, ONVIF
Enabling HTTPS doesn’t mean all of the camera’s traffic is encrypted. The table shows endpoints commonly found on camera networks and typical default ports; real ports vary by manufacturer and configuration.
| Endpoint | Typical port | Encryption | Note |
|---|---|---|---|
| HTTP | TCP 80 | None | Should be disabled or redirected to HTTPS |
| HTTPS | TCP 443 | TLS | Web interface and API |
| RTSP | TCP 554 | None | Authentication may be Digest; video is in the clear |
| RTSPS | TCP 322 | TLS | Requires support on both camera and VMS |
| ONVIF | Mostly the HTTP port | Can be moved to HTTPS | Verify the VMS supports ONVIF over HTTPS |
The rtsps scheme and the default port 322 are defined in RFC 7826; however, most devices in the field speak RTSP 1.0, and RTSPS support varies by manufacturer. Some manufacturers offer media encryption by tunneling RTSP inside HTTPS or with SRTP. If you can’t encrypt the video stream, you have to make sure on the network side that the stream stays only between the camera VLAN and the recording server. If there’s no encryption, there must be a boundary. We listed the allowed flows line by line in the camera traffic matrix and ACL design guide.
Verification with OpenSSL
It isn’t enough for the interface to say “certificate uploaded”. Check from the client side which certificate the camera actually presents, whether the chain is complete and which TLS versions it accepts:
# Presented certificate and chain
openssl s_client -connect 10.20.30.12:443 \
-servername cam-b1-012.cctv.corp.local -showcerts </dev/null
# Subject, issuer, dates and SAN field
openssl s_client -connect 10.20.30.12:443 </dev/null 2>/dev/null \
| openssl x509 -noout -subject -issuer -dates -ext subjectAltName
# Verify against the corporate chain
openssl verify -CAfile corp-ca-chain.pem cam-b1-012.cer
# Is TLS 1.2 accepted?
openssl s_client -connect 10.20.30.12:443 -tls1_2 </dev/null
# Is TLS 1.1 rejected? (with an OpenSSL 3.x client, SECLEVEL must be lowered)
openssl s_client -connect 10.20.30.12:443 -tls1_1 \
-cipher 'DEFAULT:@SECLEVEL=0' </dev/null
# Does it expire within 30 days? (exit code 1 if so)
openssl x509 -in cam-b1-012.cer -noout -checkend 2592000
To see “Verify return code: 0 (ok)” in the s_client output, you need to provide the corporate chain with -CAfile. If only the device certificate appears in the output and no intermediate CA, the chain was uploaded to the camera incompletely. A browser may tolerate this, but the VMS or mobile client may reject it; this is the typical cause of “it opens for me but not for the operator” cases. If the handshake completes on the TLS 1.1 attempt, the camera still accepts the old protocol. There’s one more trap: an OpenSSL 3.x client rejects TLS 1.1 itself at the default security level, so a test without @SECLEVEL=0 gives false assurance.
Renewal tracking and automation
The real burden of a certificate project isn’t the initial setup but renewal. Two hundred certificates installed on the same day also expire on the same day. The fault tickets come in bulk too. A workable routine is set up like this:
- Certificate fields in the inventory: serial number, expiry date, issuing CA and SAN values are kept for every camera and NVR. For the field structure, see the how to keep a camera inventory guide.
- Periodic scan: a script running nightly over the camera IP list pulls the certificate each device presents with
s_clientand raises warnings at 60/30/7-day thresholds with-checkend. Differences between what the inventory says and the certificate the device actually presents also surface in this scan. - Linking to the monitoring system: if your existing monitoring platform supports TLS certificate expiry checks, add cameras and NVRs; route the alarm to the team responsible for the camera system.
- Automatic renewal: some manufacturers have started supporting automatic renewal via ACME or SCEP. If supported, plan whether the internal CA offers this protocol and which path the camera will use to reach the CA, together with the ACLs.
- Firmware relationship: on some devices, a firmware update can reset the certificate store. Add certificate verification to the post-update checklist.
Common mistakes
- Certificate without a SAN: even if the CN is correct, the browser gives a name mismatch error.
- Wrong clock: when a camera without NTP reverts to 1970 or its factory date, the certificate appears “not yet valid”. Start the certificate work with an NTP check.
- The VMS not validating: if trusted certificates are uploaded to cameras but certificate validation is left off in the VMS, protection stays on the browser side only.
- Root certificate not distributed: if operator stations and mobile devices don’t trust the corporate CA, users still see the warning and still click through. Distribute the root certificate with group policy or MDM.
- Private keys left lying around: if keys and PKCS#12 files generated externally are forgotten in a shared folder, the identity assurance the certificate provides is gone.
- Treating HTTPS as the only measure: with default passwords, open services and old firmware still in place, HTTPS only protects the traffic. For general hardening, the IP camera and NVR cybersecurity checklist is the starting point.
We run the HTTPS migration of a camera fleet together with inventory, CA design and VMS compatibility tests; for the scope, see the IP camera and NVR cybersecurity hardening page. Firmware-related certificate issues need to be handled together with firmware update management.
Frequently asked questions
Does enabling HTTPS on the camera also encrypt the RTSP video stream?
No. HTTPS protects only the web interface and API calls made over HTTPS. RTSP is a separate protocol; for the stream to be encrypted, the camera and VMS must both support RTSPS, SRTP or RTSP over HTTPS tunneling.
Can a public CA such as Let’s Encrypt be used for cameras?
Public CAs don’t issue certificates for private IP addresses or for internal domain names the organization doesn’t own, such as .local. A subdomain of a domain the organization owns can be obtained with DNS validation; but shrinking validity periods mean frequent renewal across hundreds of cameras, and the name appears publicly in certificate transparency logs. In a closed camera network, an internal CA is more suitable.
Does recording stop if a certificate expires?
On most systems it doesn’t, because recording flows over RTSP. But if the VMS validates the certificate, the camera connection can drop; browsers and mobile clients show errors. The impact depends on the VMS’s validation setting. Plan renewal before expiry.
Should the certificate contain an IP address or a DNS name?
Both can go in the SAN field. A DNS name keeps the certificate valid when the IP changes; an IP address is needed for VMS connections that don’t use DNS. Browsers ignore the CN field; whichever you use must be in the SAN.