Last updated: Nov 2, 2025
The growing emphasis on digital security has led to widespread adoption of SSL/TLS certificates on the internet. These certificates play a foundational role in how devices, systems, services, and users communicate securely across networks—especially through the encrypted HTTPS protocol and other authentication-dependent protocols like VPN, API gateways, and enterprise login systems. However, not all SSL/TLS certificates function in the same way, and understanding their differences is crucial for developers, administrators, and architects who manage identity and trust in secure environments.
The two main certificate types involved in TLS-based communication are client certificates and server certificates. Although they share the same cryptographic standards and are both issued under Public Key Infrastructure (PKI) workflows, their usage, purpose, and configuration differ significantly. Server certificates are widely used to secure websites and prove the identity of the host to users, while client certificates are used to authenticate the identity of the client—whether that be a user, device, or application—to the server. The confusion arises because both types of certificates are formatted similarly (such as X.509), both are signed by a trusted Certificate Authority (CA), and both may use similar encryption algorithms and metadata.
The difference between the two lies not in the certificate format itself, but in the intended purpose of each certificate and the way it is validated during the TLS handshake. Server certificates are used to verify the identity of the host to the client, enabling users to securely access websites over HTTPS. Client certificates, on the other hand, are used by the client to prove their identity back to the server—an essential part of mutual TLS (mTLS) authentication, often used for high-security environments like internal enterprise services, API authentication, VPN access, and device identity in IoT ecosystems.
As organizations increasingly adopt Zero Trust architecture, enforce strong identity-based authentication, or shift to encrypted service-to-service communications, understanding the functional and technical differences between client and server certificates becomes essential—not only for compliance and security, but also for avoiding configuration errors such as TLS handshake failures, invalid key usage errors, or certificate purpose mismatches. This article will give you a clear and comprehensive understanding of the distinction between these two certificate types, how they work in TLS communication, what fields and attributes differentiate them, and how to implement or troubleshoot them in real-world systems.
The Roles They Play in TLS: Identity, Trust, and the Handshake
To understand the difference between a client certificate and a server certificate, it’s essential to first understand the context in which they operate: the TLS (Transport Layer Security) handshake. TLS is the protocol that secures data in transit between two communicating parties, such as a web browser (client) and a web server (host). The TLS handshake is the negotiation phase where both sides agree on security parameters—such as the version of TLS, cipher suites, and identity verification—before encrypted communication can begin.
The core purpose of a server certificate is to prove the identity of the server to the client. When a user visits a website secured with HTTPS, the server presents its certificate, signed by a trusted Certificate Authority (CA), to convince the user’s browser that it is communicating with the legitimate website and not an imposter. This server authentication is critical for preventing man-in-the-middle attacks, phishing sites, and impersonation attempts.
But in traditional TLS, this authentication process is one-way. The server proves its identity to the client, but the client does not prove its identity back to the server. In most use cases—such as browsing public websites, accessing blogs, or conducting e-commerce—this one-way trust model is sufficient because the identity and security of the user are handled at the application layer (such as through login forms, tokens, or cookies).
However, there are scenarios where the server needs to verify not only that a legitimate client is connecting but that the identity of the client has been cryptographically validated. These are use cases that require client authentication, which is where client certificates come into play. In mutual TLS (mTLS), both the server and client present certificates during the TLS handshake. The server first presents its certificate, as usual, to validate its authenticity. Then, the server requests the client certificate, which the client must provide and prove ownership of via cryptographic challenge-response. Only after both certificates are verified can the TLS session proceed.
This distinction is critical because a server certificate is always presented to the user (or device) to establish secure communication, whereas a client certificate is only presented when the system requires strong, certificate-based authentication of the user or system accessing the resource.
In short:
-
A server certificate answers the question: “Is this server who it claims to be?”
-
A client certificate answers the question: “Is the requester allowed to connect, and can they prove their identity cryptographically?”
This difference becomes even more important when deploying high-security systems like Zero Trust networks, encrypted APIs, or identity-aware reverse proxies, where TLS certificates serve as identity credentials—not just as encryption enablers.
Server Certificates Explained
A server certificate, also referred to as an SSL certificate or TLS server certificate, is a digital certificate installed on a server—typically a web server, an API gateway, an SMTP server, or any endpoint that needs to prove its identity to connecting clients over TLS. In the context of HTTPS, server certificates are what allow browsers such as Chrome, Firefox, Safari, and Edge to display the padlock icon and establish a secure, encrypted connection with a website.
A server certificate forms part of a public key infrastructure (PKI) ecosystem. It contains information such as the server’s domain name, organization, issuing Certificate Authority (CA), public key, validity period, and the digital signature from a trusted CA. Most modern applications use certificates that follow the X.509 standard, a format that defines how certificate information is structured and stored.
The primary purpose of a server certificate is to authenticate the identity of the server to the client. During the TLS handshake, the server sends its certificate to the client, which verifies the certificate’s validity by ensuring:
-
The certificate was issued by a trusted CA,
-
The certificate has not expired or been revoked,
-
The certificate’s Common Name (CN) or Subject Alternative Name (SAN) matches the hostname being accessed,
-
The certificate has the correct Extended Key Usage (EKU) set for server authentication.
The last point is especially important. A certificate must be issued with the correct EKU, specifically the OID (Object Identifier) 1.3.6.1.5.5.7.3.1, known as serverAuth. This value tells the browser or client that the certificate is authorized for use as a server certificate during a TLS handshake. If this value is missing or incorrect, the certificate cannot be used as a server certificate, and the connection will fail—even if the certificate is otherwise valid.
A typical server certificate contains the following fields:
-
Subject: The name of the server (e.g.,
CN=www.example.com) -
Issuer: The Certificate Authority that issued the certificate
-
Public Key: Used in the TLS handshake to verify the certificate and encrypt communication
-
Validity Dates: The start and end dates for the certificate
-
Key Usage and Extended Key Usage: Defines how the certificate is allowed to be used
-
Signature Algorithm: Specifies the cryptographic algorithm used by the CA to sign the certificate
The certificate is validated through a certificate chain, which usually includes the server certificate, an intermediate certificate, and a root certificate. The root certificate is trusted by default in browsers and operating systems, and intermediate certificates form a trust bridge between the server’s certificate and the trusted root.
Server certificates are commonly used for:
-
Securing websites with HTTPS
-
Authenticating public-facing API endpoints
-
Protecting email servers using TLS
-
Enabling secure remote access services like FTPS and SMTPS
-
Ensuring encrypted communications between reverse proxies and backend services
A securely deployed server certificate is an essential part of any trusted, modern internet-facing application or service. Failure to properly install or configure a server certificate can lead to errors such as NET::ERR_CERT_AUTHORITY_INVALID, SSL_ERROR_BAD_CERT_DOMAIN, or handshake failures. Worse yet, not using a server certificate at all exposes users to unencrypted communication, phishing, content injection, or credential theft.
In environments where security and compliance are required—such as eCommerce, healthcare, finance, or corporate networks—server certificates are mandatory for ensuring that the server is authenticated and the data exchanged with it is encrypted and protected from tampering.
Client Certificates Explained
A client certificate is a type of digital certificate that is used to authenticate the identity of the client in a TLS connection. Unlike a server certificate, which is designed to prove the identity of a website or server to a user or device, a client certificate is presented by the end user, device, or application to prove its identity to the server. This form of identity verification is a foundational component of mutual TLS (mTLS), where both ends of the communication channel authenticate one another using certificates.
Client certificates are also based on the X.509 standard, and they contain fields similar to a server certificate, such as subject name, issuer, public key, and validity period. However, the key difference lies in how the certificate is used and validated. The server must request the client certificate during the TLS handshake, and the client must be configured to provide the certificate as a form of authentication. If the client certificate is valid, trusted, and matches the expected criteria such as issuer and Extended Key Usage (EKU), the server then grants access.
The Extended Key Usage field (EKU) plays a particularly important role in distinguishing client certificates from server certificates. A valid client certificate must include the EKU value 1.3.6.1.5.5.7.3.2, known as clientAuth. This EKU signals to the server that the certificate is permitted and intended for use in client authentication during TLS handshake. If a certificate does not include this specific EKU (or includes only serverAuth), it cannot act as a client certificate.
Client certificates are most commonly used in environments where certificate-based authentication is preferred over password-based systems. These environments include enterprise VPN access, internal APIs, private cloud systems, corporate Wi-Fi authentication (such as EAP-TLS), secure email signing, and device identification for IoT systems. As organizations transition from traditional network-based access control models to Zero Trust architectures, client certificates increasingly serve as a secure alternative to passwords, session tokens, or multifactor authentication codes.
Common real-world applications of client certificates include:
-
Authenticating users to internal websites, dashboards, or developer portals
-
Providing device identity to microservices or APIs in a Kubernetes or service mesh environment
-
Ensuring only authorized mobile or IoT devices can connect to backend services
-
Authenticating employees or contractors into VPN, SSPM, or corporate Wi-Fi networks using EAP-TLS
-
Securing financial systems that require digitally signed transactions
Client certificates are often stored in a PKCS#12 bundle (.pfx or .p12 files), because the certificate and its associated private key must be securely stored and available on the client device participating in the TLS handshake. These bundles are typically password-protected and installed in the operating system’s certificate store, browser trust store, or API client software.
An essential concept in using client certificates is private key ownership, because for a client to be properly authenticated, the client must be able to prove possession of the private key associated with the certificate. During the TLS handshake, this is achieved by cryptographically signing a challenge from the server. The server verifies the signature using the public key embedded in the certificate and, only if valid, proceeds with the connection.
To manage client certificate authentication at scale—especially in enterprise or cloud environments—organizations must have a corresponding certificate issuance and lifecycle process. This includes issuing certificates via a corporate PKI or SaaS CA, tracking their validity, revoking them when devices or users are de-provisioned, and rotating keys on a scheduled basis or when compromise is suspected.
The core difference between client and server certificates, then, lies in their role in the authentication process, even though they both conform to the same certificate format and cryptographic standards. While server certificates authenticate the host, client certificates authenticate the requester. This inversion matters deeply in systems that rely on cryptographic rather than password-based authentication, and in systems where session layer access is not enough—because the identity must be assured at the transport layer itself.
EKU and OIDs: The Technical Difference That Matters Most
While client and server certificates may look similar on the surface, their most important technical difference comes down to a specific certificate field known as Extended Key Usage (EKU). This field, defined in the X.509 standard and enforced during the TLS handshake, specifies the purpose of the certificate. Without the correct EKU, a certificate will not be considered valid for its intended use, even if it is properly issued, signed by a trusted Certificate Authority (CA), and within its validity period.
The EKU field is located inside the certificate’s metadata, and it contains one or more Object Identifiers (OIDs), which point to specific, predefined usages. These OIDs are used programmatically by applications, browsers, servers, and operating systems to determine whether a certificate can be used for a particular type of TLS authentication.
The two most relevant EKUs in the context of TLS authentication are:
-
1.3.6.1.5.5.7.3.1→ TLS Web Server Authentication (serverAuth) -
1.3.6.1.5.5.7.3.2→ TLS Web Client Authentication (clientAuth)
A server certificate must include the serverAuth EKU (1.3.6.1.5.5.7.3.1) to indicate that it is authorized to act as a server during a TLS handshake. If this OID is missing, a browser such as Chrome or Firefox will reject the certificate during HTTPS negotiation—even if the certificate is valid in every other respect. For example, if a certificate mistakenly includes only a signature authentication EKU or contains only clientAuth, it will fail with errors such as “Incorrect certificate purpose” or “Wrong extended key usage”.
A client certificate, on the other hand, must include the clientAuth EKU (1.3.6.1.5.5.7.3.2). This tells the server that the certificate is intended to validate the identity of the connecting client—whether that client is a person, device, or application. A certificate without this EKU cannot be used for client authentication in mTLS, and the server will refuse to recognize it as a valid identity credential.
In many cases, certificates may contain multiple EKUs, especially in enterprise environments or more flexible certificate profiles. However, it is the presence or absence of these specific OIDs that determines whether a certificate is valid for server-side authentication or client-side authentication during a TLS handshake.
This distinction is not cosmetic—it is programmatically enforced by nearly all security frameworks, including OpenSSL, Windows certificate services, macOS Keychain, Java keystores, and cloud-managed PKI systems. A certificate that is missing the correct EKU will fail silently at the handshake layer or trigger explicit TLS validation errors, depending on the implementation.
For example, if you try to use a client certificate as a server certificate in Nginx or Apache, the handshake will fail, even if the rest of the certificate appears valid. Similarly, if an API gateway is configured to require mTLS and the client does not supply a certificate with the proper clientAuth EKU, the connection will terminate before any HTTP request reaches the API layer.
To verify the EKU fields in a certificate, administrators can use a command such as:
openssl x509 -in certificate.pem -noout -text | grep -A1 "Extended Key Usage"
This command will list the EKUs embedded in the certificate. If you see “TLS Web Server Authentication”, it indicates that the certificate can be used to validate a server during HTTPS. If you see “TLS Web Client Authentication”, the certificate is allowed to be used by a connecting client during mTLS operations.
Incorrect EKU values are a surprisingly common source of certificate deployment issues, especially when certificates are manually generated or incorrectly profiled during renewal. This is why many commercial Certificate Authorities create certificate templates specifically for either “Server Authentication” or “Client Authentication”—to prevent the risk of the wrong certificate purpose being issued and causing connection failures.
The EKU field, therefore, is the single most reliable and enforceable attribute that distinguishes client certificates from server certificates at the cryptographic and protocol validation level.
Mutual TLS (mTLS): When Both Sides Present Certificates
In traditional TLS communication, authentication is unidirectional—only the server proves its identity to the client using a server certificate. This model is the foundation of nearly all public HTTPS traffic on the web. When you visit a website like your bank or an eCommerce store, the browser validates that the website’s SSL certificate is legitimate and signed by a trusted Certificate Authority (CA). Once verified, an encrypted session is established, but the client (you) remains anonymous at the TLS layer. Your identity, if needed, is confirmed later at the application level, usually through a username, password, token, or cookie.
Mutual TLS (mTLS) extends this concept by introducing bidirectional authentication. In mTLS, both the server and the client present certificates during the TLS handshake. The server first presents its certificate to the client as usual, and once validated, it requests the client to provide its own certificate in return. The client’s certificate is then verified by the server against a trusted CA or a defined trust store. If both certificates are valid, trusted, and match the required policies, the handshake completes and a secure, mutually authenticated connection is established.
This mutual verification process ensures that both parties—the client and the server—are who they claim to be. It combines encryption, integrity, and authentication into a single handshake process that operates at the transport layer, which makes it much harder to spoof, intercept, or impersonate either side of the connection. This is particularly critical for high-security environments where sensitive data or trusted identities are exchanged.
How mTLS Works in Practice
The mTLS handshake is an enhanced version of the standard TLS handshake. The flow can be summarized as follows:
-
The client connects to the server and requests a secure session.
-
The server responds with its server certificate (EKU:
serverAuth) to prove its identity. -
The client validates the server’s certificate by checking the CA signature, expiration, revocation status, and hostname match.
-
Once the server’s certificate is verified, the server sends a CertificateRequest message, asking the client for its certificate.
-
The client provides its client certificate (EKU:
clientAuth) and proves possession of the associated private key through a digital signature. -
The server validates the client certificate’s authenticity, issuer, and validity.
-
If both verifications succeed, the handshake completes and encrypted communication begins.
At the end of this process, both sides are cryptographically authenticated—meaning each endpoint knows it is talking to a trusted, verified entity. This model removes the need for password-based authentication at the application level in many cases, because identity is established through the certificates themselves.
Common Use Cases for mTLS
Mutual TLS is widely used in situations where standard server-only authentication is not sufficient or where identity must be proven at a deeper, transport-layer level. Common use cases include:
-
API authentication – Many enterprise APIs require clients (applications or microservices) to present client certificates to verify their identity before making requests. This ensures that only authorized systems can access sensitive endpoints.
-
Internal microservices communication – In distributed architectures, particularly those using service meshes like Istio or Linkerd, mTLS is used to secure traffic between internal services automatically.
-
VPN and remote access – Corporate VPNs and remote access solutions use client certificates to ensure that only enrolled devices can connect to internal systems.
-
Wi-Fi authentication (EAP-TLS) – Enterprises use client certificates to allow secure wireless connections without passwords.
-
IoT device identity – Internet of Things devices often authenticate to cloud services using client certificates to ensure device-level trust.
-
Financial and government systems – Sensitive networks often use mTLS to meet regulatory requirements and prevent unauthorized data access.
In each of these examples, mTLS provides a far stronger assurance of identity and integrity than standard username-password or token-based authentication. The system does not simply trust that the connecting device is legitimate—it verifies that the device holds a cryptographically valid certificate issued by a trusted CA.
Benefits of Using mTLS
The advantages of implementing mutual TLS authentication include:
-
Stronger identity assurance: Both client and server identities are verified using certificates instead of credentials that can be stolen or guessed.
-
Resistance to credential theft: Since mTLS doesn’t rely on passwords or API keys, it eliminates entire classes of attacks such as credential stuffing and brute-force authentication attempts.
-
Encryption and integrity at transport layer: All traffic is encrypted end-to-end, ensuring confidentiality and protection against tampering.
-
Seamless integration with Zero Trust principles: mTLS supports continuous authentication between services, enabling Zero Trust architectures to validate identity at every request.
-
Automation readiness: With modern PKI and certificate management tools, mTLS can be implemented and rotated automatically using protocols like ACME or enterprise certificate managers.
Challenges and Operational Considerations
Despite its advantages, mTLS introduces operational complexity. Managing client certificates requires robust processes for issuance, storage, renewal, and revocation. Each device or user must have a unique certificate, which creates a lifecycle management challenge in large organizations. Without automation, maintaining mTLS at scale can become cumbersome.
Additionally, application teams must configure servers to request and verify client certificates properly. Misconfigurations—such as missing trusted root CAs, expired client certificates, or incorrect EKUs—can easily cause handshake failures. Integrating mTLS into existing systems that were designed for password-based logins can also require architectural changes.
Modern solutions, such as API gateways (e.g., Kong, Tyk, Curity) and service meshes, now provide native support for mTLS, automating much of the key management and verification process. These platforms often tie certificate-based authentication to user or service identities within an identity provider (IdP), such as Active Directory, AWS IAM, or Kubernetes Secrets, simplifying large-scale deployments.
Why mTLS Matters
Mutual TLS is no longer a niche security mechanism—it has become an essential part of modern cybersecurity frameworks, especially as organizations adopt Zero Trust Network Access (ZTNA) and service-to-service authentication models. It ensures that trust is not assumed based on network location but is instead continuously verified at every connection.
In summary, mTLS combines the capabilities of both client certificates and server certificates into a single handshake that authenticates both parties. The server proves to the client that it is genuine, and the client proves to the server that it is authorized. The result is a highly secure and verifiable communication channel that forms the backbone of modern secure communications in enterprise, cloud, and IoT environments.
Practical Comparison: Client vs Server Certificates
Although both client and server certificates are built using the same underlying X.509 framework and rely on the same public key infrastructure (PKI), their roles, usage, and validation logic differ significantly. Understanding these distinctions is essential when deploying, configuring, or troubleshooting TLS-based systems, particularly those involving complex authentication or multi-party communication.
A server certificate is used to authenticate a server to a client. Its primary function is to allow the client—often a web browser, API consumer, or application—to verify the identity of the server it is connecting to. This prevents malicious actors from impersonating trusted servers. Server certificates are nearly always publicly trusted, signed by a certificate authority (CA), include a DNS name in the Subject Alternative Name (SAN) field, and are designed for the “serverAuth” purpose.
A client certificate, on the other hand, reverses the authentication flow. Instead of proving the identity of a server to a user, it allows a user, device, or application to prove its identity to a server. Client certificates are not typically issued by public certificate authorities, since they often represent internal or private identities, devices, or privileged API callers. They do not contain DNS entries and are used for the “clientAuth” purpose.
From a protocol perspective, server certificates support server-side TLS authentication, which is standard for almost all HTTPS traffic on the internet. Client certificates support client-side TLS authentication, which is used in mutual TLS (mTLS) environments, enterprise credentials-management systems, or closed networks that require strong cryptographic authentication instead of—or in addition to—passwords and tokens.
The two certificate types also differ in how and where they are distributed. Server certificates are public and often visible to anyone who connects to a site. Client certificates are private to each user or device and must be protected against theft, since they serve as identity credentials. In enterprise settings, client certificates are frequently issued through internal PKI systems, stored in secure keystores, and bundled as .pfx or .p12 files containing both the certificate and private key.
These practical differences—along with mismatched or missing Extended Key Usage (EKU) identifiers—are common sources of TLS handshake failures across systems that rely on certificates. A server certificate without serverAuth will break HTTPS. A client certificate without clientAuth will be rejected during authentication. These failures typically surface as generic “certificate purpose not allowed” errors unless developers or administrators explicitly inspect the certificate fields.
Summary Comparison Table
Below is a simplified visual comparison of the key differences between client and server certificates:
| Feature | Server Certificate | Client Certificate |
|---|---|---|
| Purpose | Authenticate server to client | Authenticate client to server |
| TLS Model | One-way TLS or mTLS | mTLS only |
| EKU (OID) Required | serverAuth (1.3.6.1.5.5.7.3.1) |
clientAuth (1.3.6.1.5.5.7.3.2) |
| Common Use Cases | HTTPS, public websites, APIs, load balancers | VPN access, API clients, devices, enterprise login |
| Identity Type | Domain, hostname | User, device, service |
| Signed By | Public CA or Private CA | Usually Private CA or enterprise PKI |
| Contains DNS/SAN | Yes | Usually no |
| Installed On | Server or edge proxy | Client machine, application, browser, OS keystore |
| File Format | PEM, CRT, CER | PKCS#12 (.p12/.pfx), PEM |
| Private Key Stored | On server | On client device |
While both types of certificates perform identity validation, the key takeaway is their directionality: server certificates prove who the server is; client certificates prove who the requester is. In environments requiring mutual trust, such as B2B APIs, Zero Trust architectures, and large-scale enterprise identity systems, both types must be correctly issued, profiled, and deployed before the system can securely authenticate traffic.
Common Deployment Scenarios and Best Practices
Client and server certificates are core building blocks in modern secure networking, and they are deployed in a variety of systems depending on the level of security, authentication requirements, regulatory compliance, or architectural design. While server certificates are practically ubiquitous today thanks to HTTPS adoption, client certificates—used for strong authentication—are increasingly common in environments where passwords and tokens fall short of security or reliability standards. Below are some of the most common real-world scenarios in which each certificate type is deployed, along with best practices for managing them.
Deployment Scenarios for Server Certificates
Server certificates are best known for their role in securing the web via HTTPS. Nearly every public-facing website or REST API endpoint should be protected by a valid server certificate that is signed by a trusted Certificate Authority (CA). Beyond traditional web services, server certificates are also used on SMTP servers, FTP servers, enterprise VPN concentrators, cloud load balancers, internal reverse proxies, service meshes, and IoT hub interfaces. They serve as a binding between a hostname or domain name and a cryptographically verifiable identity, preventing impersonation and enabling encrypted transport.
As a best practice, server certificates should always:
-
Contain all relevant hostnames in the Subject Alternative Name (SAN) field, since browser and client validation no longer depend on the Common Name (CN) field alone.
-
Use strong modern key lengths (e.g., RSA 2048+ or ECC curves).
-
Be issued by a CA that is trusted by major operating systems and browsers or by a private CA in restricted networks.
-
Be managed using automation where possible (e.g., ACME clients such as Certbot for Let’s Encrypt, or enterprise automation through HashiCorp Vault, Cloudflare SSL for SaaS, or AWS Certificate Manager).
Deployment Scenarios for Client Certificates
Client certificates are most commonly deployed in use cases where the client’s identity must be cryptographically verified before access is granted. Unlike server certificates, client certificates are not publicly visible and are stored on individual user devices, enterprise laptops, service accounts, browsers, mobile devices, IoT boards, or specific software keystores. They are issued to represent not a website but a person, device, or software identity, such as a technician’s laptop, a cloud API caller, or a firmware-equipped sensor.
Examples of client certificate usage include:
-
VPN authentication where each remote employee device provides a client certificate to access a secure corporate network.
-
Enterprise Wi-Fi using EAP-TLS, where devices authenticate without passwords.
-
API mutual authentication, where back-end services call each other over mTLS to ensure service-level identity validation.
-
IoT or embedded device identification, where certificates prevent rogue devices from connecting to a central controller or cloud platform.
-
Zero Trust workloads, where the network location is not trusted and client identity must be asserted at every connection, not only at login.
As a best practice, client certificates should:
-
Be issued via an automated certificate issuance system (internal PKI, cloud PKI, or enterprise IAM tools).
-
Be stored securely in a device’s trusted keystore or browser certificate store, using protected file types such as
.p12or.pfx. -
Have clear and enforceable expiration dates, so that offboarded users or devices can be automatically or manually de-provisioned when the certificate expires.
-
Include the proper Extended Key Usage (EKU) field set to
clientAuth, or authentication will fail during mTLS handshake.
Lifecycle and Trust Considerations
Whether dealing with server or client certificates, the entire certificate lifecycle must be considered—not just issuance. Organizations must plan for expiration, renewal, rotation, revocation, intermediate CA validation, and revocation list or OCSP availability. A certificate without proper renewal automation may expire unexpectedly, causing service outages, loss of trust, and user-facing errors. On the other hand, certificates that are not revoked upon device loss or employee exit create ongoing security vulnerabilities.
Best practices applicable to both certificate types include:
-
Automating certificate renewal to reduce risk and administrative burden.
-
Shortening certificate validity periods to reduce the attack window (e.g., 90-day certs).
-
Using centralized certificate monitoring to alert administrators before expiration.
-
Maintaining a robust and available CRL or OCSP endpoint to allow systems to confirm the revocation status of certificates.
-
Protecting private keys at rest, using hardware-backed storage where possible (such as TPMs, HSMs, or secure enclaves).
The Importance of Private Key Protection
Unlike server certificates, where the private key is typically secured on a server or load balancer, client certificates often live on end-user devices or application nodes—and are therefore at much greater risk of compromise. Loss of a private key associated with a client certificate is equivalent to credential theft; an attacker could impersonate a trusted user or device.
To avoid this, organizations can:
-
Enforce multi-factor authentication to access local key stores.
-
Use TPM-backed keys or platform APIs like Secure Enclave, keystore modules, or smart cards.
-
Restrict private key export on issued certificates and prevent copying of identity bundles.
By properly separating the responsibilities, purposes, and handling practices of client and server certificates, administrators can establish a more secure and reliable PKI environment, reduce TLS handshake failures, reduce phishing and impersonation attacks, and gain deeper control over identity and trust in secure systems.
How to Inspect and Verify Certificates (Hands-On)
Understanding how to inspect and verify certificates is an essential skill for anyone managing or troubleshooting TLS connections—whether those certificates are used for servers, clients, APIs, or internal services. Certificates can be checked at a number of layers, including the command line, browser developer tools, or operating system certificate management utilities. The underlying goal is always the same: to validate a certificate’s authenticity, purposes (EKU), key validity, and trust chain.
There are three primary steps involved in verifying a certificate: checking the certificate contents, validating the trust chain, and confirming the extended key usage (EKU). Below is a practical guide to performing those checks.
1. Inspect a Certificate with OpenSSL
OpenSSL is one of the most powerful and widely used command-line tools for inspecting certificates. It provides a detailed view into the structure and fields of an X.509 certificate.
Here’s how to display a certificate’s contents:
openssl x509 -in certificate.pem -noout -text
This command produces detailed output including the Subject (identity), Issuer (CA), validity period, public key, signature algorithm, and critical extensions such as Key Usage and Extended Key Usage.
To filter just the EKU field from the certificate:
openssl x509 -in certificate.pem -noout -text | grep -A1 "Extended Key Usage"
-
If you see
TLS Web Server Authentication, it indicates the certificate can be used as a server certificate. -
If you see
TLS Web Client Authentication, it indicates the certificate is valid for use as a client certificate. -
If neither is present, the certificate will likely fail certificate purpose validation and will not be accepted by most TLS libraries.
2. Check Certificate Chain and Trust Store Validity
A certificate must be chained to a trusted root certificate to be considered valid. This chain is often made up of three parts: the server or client certificate (leaf), one or more intermediate certificates, and the trusted root. You can verify whether a certificate is trusted on your system by running:
openssl verify -CAfile ca-bundle.pem certificate.pem
This command checks the certificate against the trust store provided in ca-bundle.pem. If the certificate cannot be validated to a root CA, it will fail with errors such as “unable to get local issuer certificate”.
3. Inspect Certificates in Browser Developer Tools
When diagnosing HTTPS-related issues in a browser, the built-in developer tools are useful for in-browser validation.
-
Open Chrome or Firefox developer tools (F12)
-
Navigate to the Security tab
-
View the Connection and Certificate details
-
Expand the certificate details to view the issuer, chain, SAN entries, and certificate fingerprint
This is especially helpful for confirming whether the certificate includes the correct hostname in the Subject Alternative Name (SAN) field, and whether it was issued by a trusted Certificate Authority.
4. Validate a Certificate for mTLS
When working with mutual TLS, administrators must confirm that the client certificate and server certificate are both configured for the correct EKU purposes. To check this:
-
Inspect both certificates using OpenSSL as shown above
-
Verify that the server certificate includes
serverAuth -
Verify that the client certificate includes
clientAuth -
Confirm that neither certificate has expired or been revoked
Failure to match certificate usage fields is one of the most common causes of handshake failures in mTLS configurations.
5. Importing and Viewing Client Certificates
Client certificates (usually stored as .pfx, .p12, or .pem/.key bundles) must be installed into the device or browser where they are used. These certificates often bundle both the certificate and private key and require password-based import.
Examples of where client certificates may be installed:
-
Windows: Using
certmgr.mscor MMC certificate store -
macOS: Through Keychain Access → “My Certificates”
-
Browsers: Chrome and Firefox have built-in certificate management tabs under “Privacy and Security” settings
Once installed, the certificate must be configured so that it is available to the application or mTLS-enabled connection.
6. Verify Certificate Revocation Status
Certificate validation tools and inspection commands do not always check revocation status, which can be vital. Revocation occurs when a certificate is intentionally invalidated by the CA. You can check revocation using:
-
OCSP (Online Certificate Status Protocol) via the command line or automated tools
-
CRL (Certificate Revocation List) supplied by the CA
Revocation must also be enabled on your server or client endpoint for proper certificate validation — especially in regulated environments.
By mastering the ability to inspect and verify certificates using tools such as OpenSSL, browser security utilities, and system-level certificate managers, developers and administrators can quickly diagnose issues such as invalid key usage, failed trust validation, certificate expiration, missing SAN fields, and broken chains. Correct certificate inspection is also an essential step in troubleshooting TLS handshake failures in client-server or mTLS deployments.
Configuring mTLS at the Edge or Gateway
Mutual TLS (mTLS) requires configurations where both the client and the server must present valid certificates during the TLS handshake. This often happens at the edge of a network—such as load balancers, reverse proxies, or API gateways—where authentication and identity verification occur before traffic is allowed to flow deeper into backend services or applications. While configuration specifics vary across platforms, the core requirements remain consistent: the server must be configured to request a client certificate, validate it against a trusted CA, and reject any connection without a valid certificate.
Below are example configurations for common platforms used to implement mTLS in production, including NGINX, Apache, and API gateways such as Tyk and Kong. These examples underscore how client and server certificates are put into practice, not only at a conceptual level but at a configuration level.
Enabling mTLS in NGINX
NGINX is one of the most widely used reverse proxies and web servers in the world, and it fully supports mTLS. To enable mTLS in NGINX, the administrator must configure NGINX to:
-
Use a valid server certificate (with
serverAuthEKU) -
Request client certificates
-
Verify client certificates against a trusted CA bundle
Example configuration block:
server {
listen 443 ssl;
server_name api.example.com;
ssl_certificate /etc/ssl/certs/server.crt;
ssl_certificate_key /etc/ssl/private/server.key;
ssl_client_certificate /etc/ssl/certs/ca.crt;
ssl_verify_client on;
location / {
proxy_pass http://backend-service;
}
}
Here, ssl_client_certificate specifies the CA used to verify client certificates. Setting ssl_verify_client on enforces mTLS—any missing or invalid client certificate results in an immediate connection rejection.
Enabling mTLS in Apache HTTP Server
Apache HTTP Server, another popular web server and proxy, also supports mTLS through the mod_ssl module. Here is an example configuration:
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /path/to/server.crt
SSLCertificateKeyFile /path/to/server.key
SSLCACertificateFile /path/to/ca.crt
SSLVerifyClient require
SSLVerifyDepth 2
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
The directive SSLVerifyClient require forces Apache to validate the client certificate. If a certificate is not provided, or if the certificate does not pass validation, the handshake will fail and the connection will not proceed.
Enabling mTLS in an API Gateway
Modern API gateways simplify mTLS implementation and often provide built-in options for importing certificates and enabling mutual authentication at the edge. Examples include Tyk Gateway, Kong, Curity, and AWS API Gateway.
A typical high-level setup involves:
-
Uploading the CA that issues client certificates into the gateway trust store
-
Enabling the “Require client certificate” or “mTLS enforcement” setting at API or route level
-
Optionally mapping client certificates to identities (service accounts, JWTs, OAuth clients)
For example, in Tyk Gateway, mTLS can be enabled in the API configuration with:
"certificates": [
{
"subject": "CN=device-123",
"allow": true
}
],
"mutual_tls": {
"enabled": true,
"require_client_certificate": true
}
In Curity Identity Server or AWS API Gateway, administrators must import the client CA or trust bundle and enable mTLS through the configuration UI or infrastructure-as-code. Client certificates are then verified automatically, and additional access control layers can be based on certificate attributes, subject name, or custom extensions.
Key Considerations for mTLS Configuration
When configuring mutual TLS, keep the following best practices in mind:
-
Proper certificate purposes: Ensure server certificates have
serverAuthEKU and client certificates haveclientAuthEKU. -
CA distribution: All servers must have access to the correct client certificate CA bundle, and vice versa.
-
Revocation checks: Enable OCSP or CRL checks, especially for long-lived client certificates used in devices.
-
Least-privileged trust: Only allow certificates from trusted issuing CAs or specific certificate profiles.
-
Error handling: Improve transparency by returning clear error codes when connection rejection is due to failed certificate validation.
-
Automation: Batch-managing client certificates across large fleets of devices or applications requires automation via PKI APIs, such as ACME, SCEP, EST, or cloud PKI services.
Why mTLS Belongs at the Edge
The edge of a network is where control is strongest and trust must be established early. Configuring mTLS at the edge allows the gateway or proxy to authenticate clients before any request reaches backends—reducing the load on internal systems, protecting internal services from exposure, and supporting Zero Trust principles.
Whether securing microservice-to-microservice connections or verifying identity for IoT devices, APIs, or mobile applications, correctly implemented mTLS provides a strong security foundation that goes beyond traditional credentials or tokens by tying identity directly to cryptographic artifacts managed at the operating system or hardware level.
Troubleshooting: Purpose Mismatch, Chain Issues, and Revocation
TLS and mutual TLS (mTLS) deployments rely heavily on correct certificate configuration and trust chains. Even a small mistake—such as using the wrong certificate type, missing a key usage extension, or failing to provide the full CA chain—can cause TLS handshake failures, browser errors, or connection drops. Understanding how to troubleshoot these issues is critical for administrators, developers, and security engineers working with certificate-based authentication.
Below are some of the most common issues encountered in TLS deployments, particularly when mutual TLS is involved, along with practical guidance for diagnosing and resolving them.
Incorrect Certificate Purpose (EKU Mismatch)
One of the most common causes of certificate-related connection errors is using a certificate for the wrong purpose. As explained earlier in this article, server certificates and client certificates rely on different Extended Key Usage (EKU) identifiers:
-
Server certificates:
serverAuthEKU (1.3.6.1.5.5.7.3.1) -
Client certificates:
clientAuthEKU (1.3.6.1.5.5.7.3.2)
If an administrator accidentally installs a client certificate on a server, or attempts to authenticate a client using a certificate without clientAuth, the TLS handshake will fail with cryptic errors such as:
-
“certificate not suitable for use in specified authentication”
-
“extended key usage does not permit use”
-
“remote error: tls: bad certificate”
To diagnose this issue, inspect the certificate with OpenSSL or a browser certificate viewer and verify that the correct EKU values are present.
Incomplete Trust Chain
Another frequent failure occurs when the TLS endpoint does not provide the full certificate chain during a connection. TLS certificates often depend on intermediate Certificate Authority (CA) certificates that “bridge” the leaf certificate (client or server) to a trusted root. If the endpoint only provides the leaf certificate without its intermediate CA, most clients will reject the connection even if the certificate was issued by a trusted root.
This issue is prevalent on systems where:
-
The server certificate was installed without the intermediate chain
-
The client certificate store does not include the required root or intermediate CAs
-
The API or backend system is using custom CA hierarchies but has not deployed the complete trust bundle
A typical error message for this issue is:
-
“unable to get local issuer certificate”
-
“certificate verify failed: unable to find valid certification path to requested target”
You can diagnose chain validity by using:
openssl verify -CAfile ca-bundle.pem certificate.pem
Or by analyzing the certificate information in the browser under the Security tab. If the chain is broken, the solution is to install or include the correct intermediate CA certificates.
Revoked Certificates
Certificates can be revoked by the Certificate Authority for several reasons, including private key compromise, organizational policy violations, or unexpected certificate reuse. When a revoked certificate is presented during a TLS handshake, most security-compliant clients will reject the connection.
This typically occurs when:
-
A server or client continues using an older, revoked certificate after renewal
-
A CA revokes a certificate due to compromise or error, and the application hasn’t been updated
-
The endpoint enforces OCSP (Online Certificate Status Protocol) or uses CRLs (Certificate Revocation Lists) to check certificate status
If a revoked certificate is detected, you may see errors such as:
-
“certificate has been revoked”
-
“OCSP verify failed”
-
“NET::ERR_CERT_REVOKED” (in Chrome)
To diagnose this, check the certificate’s revocation status via:
-
openssl ocspcommand (if the OCSP URL is known) -
The DOI or URL embedded in the certificate under CRL Distribution Points
-
Browser error messages or developer tools
The resolution for revocation issues is straightforward: replace the revoked certificate with a valid, newly issued certificate, and ensure the revoked version is removed from all systems.
Missing Subject Alternative Name (SAN)
Modern TLS clients, including browsers and many API frameworks, require that the certificate include the expected domain or hostname in the Subject Alternative Name (SAN) field. The older Common Name (CN) field is no longer sufficient for hostname validation due to security changes in the CA/B Forum guidelines and browser enforcement.
A server certificate that lists only a CN without SAN entries will fail validation with errors such as:
-
“Certificate does not match hostname”
-
“ERR_CERT_COMMON_NAME_INVALID”
To diagnose this, inspect the certificate for SAN entries using:
openssl x509 -in server.crt -noout -text | grep -A1 "Subject Alternative Name"
If SAN entries are missing, the certificate must be reissued with the correct SAN values.
Certificate Expiry and Renewal Gaps
Certificates have finite validity periods and must be renewed. When a certificate expires, the connection will fail across all TLS-capable systems. This is often due to process oversight or manual renewal dependency.
Expired certificate errors typically say:
-
“certificate has expired”
-
“ssl handshake failure: certificate verify failed (expired)”
Tools like Certbot, AWS ACM, HashiCorp Vault, and Kubernetes cert-manager can automate renewal and rotation, greatly reducing downtime and operational risk.
Security and Operations Considerations
Deploying and managing certificates—whether client or server certificates—requires carefully balancing cryptographic security, performance, operational efficiency, and compliance requirements. While certificates improve trust and authentication by design, they also introduce a lifecycle challenge: protecting private keys, renewing certificates on time, revoking compromised certificates, and ensuring consistency across large distributed systems. Failure in any of these areas can lead to outages, loss of security, or both.
The strategic goal when operationalizing client and server certificates is not simply to get them “working”, but to build a repeatable, auditable, and automated system to issue, deploy, monitor, and renew certificates across the entire organization. This is especially true for mTLS, where each client may require its own certificate, and scale can grow into the thousands or millions of identities—spanning users, devices, services, or containers.
Certificate Lifecycle Management
The lifecycle of a certificate begins with issuance and continues through deployment, monitoring, renewal, and eventual revocation. While it is possible to manage this lifecycle manually for a small number of certificates, enterprise environments must use some form of certificate automation or certificate management platform.
Key operational components of certificate lifecycle management include:
-
Issuance: Issuing certificates through a trusted Certificate Authority (CA), ideally using standardized APIs such as ACME, SCEP, or EST.
-
Deployment: Distributing certificates to servers, devices, or applications using secure channels or orchestration platforms.
-
Monitoring: Continuously checking certificate validity status, revocation flags, and expiration. Tools like Venafi, Smallstep, Cert-manager, and even external monitors can alert teams when certificates are nearing expiration.
-
Rotation: Regularly renewing or replacing certificates and private keys to prevent compromise and maintain compliance.
-
Revocation: Revoking certificates that have been compromised or are no longer needed, and ensuring systems check for revocation using CRLs or OCSP.
Lifecycle automation reduces both operational cost and security risk while increasing reliability.
Protecting Private Keys
Certificates alone do not guarantee security; the private keys that back them must be protected at all times. For server certificates, private keys are usually stored in secured directories on servers, load balancers, or HSM-backed cloud services. For client certificates, where keys may be stored on endpoint devices, the risk of compromise increases significantly if users can export or leak keys.
Private key protection recommendations include:
-
Use hardware-backed storage such as TPM, HSMs, or Secure Enclave (on Apple devices) when available.
-
Restrict file permissions and enforce access control around private key locations.
-
Prevent certificate bundle (.p12/.pfx) export when issuing client certificates, unless absolutely necessary.
-
Use short-lived certificates to limit exposure in the event of key compromise.
-
Enforce multi-factor authentication or device identity workflows for accessing certificates.
A compromised private key effectively means a compromised identity—whether that identity represents a website, a user, a device, or a service.
Certificate Validity and Expiration Policy
Shorter certificate lifetimes have become the modern standard in public PKI systems. For example, publicly trusted server certificates are now limited to a maximum validity of 398 days based on CA/B Forum and browser requirements. In many internal or high-security contexts, certificates are valid for even shorter periods (e.g., 90 days or less), sometimes rotated automatically every few hours in modern microservice environments.
Short-lived certificates limit the impact of private key compromise and reduce revocation dependencies, but they increase operational pressure for reliable automation. Systems must:
-
Support automated renewal and redeployment
-
Detect upcoming expiration and respond before service impact
-
Avoid reliance on manual intervention or static certificate stores
Revocation and Validation at Scale
Revocation—whether through OCSP, CRL, or custom API—remains a core part of certificate operations. However, it is still one of the hardest aspects to implement consistently in distributed systems. If OCSP or CRL endpoints are not highly available, revocation checks may fail, depending on client or browser policy.
To improve reliability, organizations may:
-
Enable OCSP stapling for server certificates, reducing latency and centralizing revocation checking
-
Deploy internal CRLs or OCSP responders that mirror external CA data
-
Avoid revocation altogether by using short-lived certificates and denying unused certificates at the access layer
Revocation must be factored into the system design early—especially when using client certificates that represent individual users or devices with access to privileged resources.
Zero-Trust and Device Identity Models
Modern Zero Trust architectures shift authentication away from the network layer and toward identity-based access control. In this model, both server and client certificates become primary authentication factors—not supplementary. They allow systems to:
-
Verify identity before granting access, regardless of network location
-
Combine certificate identity with policy (e.g., RBAC, ABAC, OAuth claims)
-
Replace traditional shared secrets, passwords, or API keys
-
Achieve secure, encrypted communication everywhere through mTLS
When integrated with identity platforms such as Okta, Active Directory, or cloud-native IAM tools, certificates can bridge role-based access, device trust, and network security into a unified model.
FAQs
What is a client certificate used for?
A client certificate is used to authenticate the identity of a user, device, or service to a server during a TLS or mutual TLS (mTLS) handshake. Unlike server certificates, which authenticate hosts to clients, client certificates authenticate clients to servers. They are commonly used in VPN access, API authentication, enterprise Wi-Fi (EAP-TLS), and Zero Trust architectures.
What OID should a server certificate include?
A server certificate must include the Extended Key Usage (EKU) value serverAuth with the OID 1.3.6.1.5.5.7.3.1. This OID signals that the certificate can be used to authenticate a server during a TLS handshake. If the certificate lacks this EKU or includes the wrong purpose, it will typically fail browser or API validation.
Can a server certificate be used as a client certificate?
No. Even though server and client certificates use the same X.509 format, they are not interchangeable. A server certificate includes the EKU serverAuth, while a client certificate must include clientAuth (1.3.6.1.5.5.7.3.2). If the correct EKU is missing, the certificate will not pass TLS purpose validation and will fail during connection attempts.
Do I need mutual TLS (mTLS) for a public website?
No, mTLS is not typically required for public websites. Standard one-way TLS, where only the server presents a certificate, is sufficient for securing HTTPS traffic. However, mTLS may be required for private web apps, API endpoints, admin portals, or when user or device identity must be verified through cryptographic credentials rather than passwords.
How do I import a .p12 or .pfx client certificate?
Client certificates packaged in .p12 or .pfx format can be imported using system certificate managers or browser settings:
-
Windows: Use the Certificate Manager (
certmgr.msc) to import into “Personal” store. -
macOS: Import via Keychain Access under “My Certificates”.
-
Chrome/Firefox: Import under Privacy and Security → Certificate Management → “Your Certificates”.
The .p12 or .pfx file includes both the client certificate and private key and is generally password-protected.
Why does my certificate show a hostname mismatch error?
A hostname mismatch error occurs when the Subject Alternative Name (SAN) field of the certificate does not match the domain the client is trying to access. Modern browsers no longer rely on the Common Name (CN) field and require the SAN extension to include the fully qualified domain name (FQDN) or IP address of the server.
How can I check if a certificate has expired?
You can check a certificate’s expiration date using:
-
Command line:
openssl x509 -in certificate.pem -noout -enddate -
Browser developer tools → Security tab → Certificate → Validity
-
Certificate management dashboards or expiration monitoring tools
Expired certificates must be renewed immediately to avoid errors such as NET::ERR_CERT_DATE_INVALID.
Conclusion
Client certificates and server certificates may share the same underlying X.509 standard and cryptographic structure, but their roles in securing digital communication are fundamentally different. A server certificate acts as the identity badge for a website or service, allowing clients—such as web browsers, apps, or devices—to verify that they are connected to the intended host. A client certificate, on the other hand, enables users, devices, or applications to prove their identity to a server during a mutual TLS (mTLS) handshake.
At the technical layer, this difference is enforced through the Extended Key Usage (EKU) field in the certificate. A valid server certificate must contain the serverAuth EKU, while a client certificate must include the clientAuth EKU. These fields aren’t optional—they are core elements that signal purpose and enforce correct certificate usage. Without them, TLS validation will fail, even if the certificate is signed and trusted.
As modern architectures migrate toward Zero Trust models, adopt service-oriented designs, or build out distributed systems such as Kubernetes clusters, mutual TLS and certificate-based identity are becoming increasingly critical. Whether you are building a secure website, deploying an API gateway, rolling out IoT devices, or managing enterprise authentication, understanding the lifecycle, scope, and validation criteria of both client and server certificates will allow you to design more secure, more reliable systems.
Effective certificate management—covering issuance, automation, rotation, revocation, and monitoring—is now a foundational part of network and application security. With proper planning, clear policies, and use of automation tools, organizations can scale certificate-based trust just as quickly as they scale their services and applications.
In the end, the difference between a client certificate and a server certificate is about identity and intent—who is being authenticated, and in which direction trust is established. When those two questions are answered correctly, TLS becomes not just a transport encryption protocol, but a cornerstone of real, verifiable, and enforceable digital trust.
