Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

What a certificate says

A certificate is a signed statement that a public key belongs to a name, for certain uses, for a limited time. Reading one field by field shows what that statement covers, and what a client still has to decide for itself.

A key needs a name

When Ava types photos.example into her browser, the browser has usually never met Lab Photos' server. The server can prove that it holds a private key by signing something fresh, as Secrets and key pairs described. But any server can hold some private key. What the browser needs to know is whether this key belongs to the name Ava asked for. That is the question Secrets and key pairs left open: whose key is it?

A certificate answers it with a signed statement. It says, in effect: this public key belongs to this name, for these purposes, during this period. The statement is signed by an issuer, a certificate authority (CA). If the browser trusts the CA and the signature verifies, it can connect the server's key to photos.example without having met Lab Photos before.

HTTPS and certificates in practice read the parts of a certificate that decide whether it fits a site: the subject alternative names and the validity dates. This lesson reads the rest. Certificates, the authorities that issue them, and the rules and systems that manage them together make up public key infrastructure (PKI).

Inside a certificate

Certificates on the web use a standard format called X.509. They are stored in a compact binary encoding, and the PEM files you saved with openssl x509 are that encoding in base64 text. Tools can decode them into readable fields. Here is a simplified, fictional decoding of the certificate Lab Photos' server sends:

Certificate:
    Version: 3
    Serial Number: 04:9f:2c:81:5e:d3:7a:10:b6
    Signature Algorithm: ecdsa-with-SHA256
    Issuer: O=Example Trust, CN=Example Issuing CA 1
    Validity
        Not Before: Sep  1 00:00:00 2026 GMT
        Not After : Nov 29 23:59:59 2026 GMT
    Subject: CN=photos.example
    Subject Public Key Info:
        Public Key Algorithm: id-ecPublicKey
        Public-Key: (256 bit), curve P-256
    X509v3 extensions:
        Subject Alternative Name:
            DNS:photos.example, DNS:accounts.photos.example
        Key Usage: critical
            Digital Signature
        Extended Key Usage:
            TLS Web Server Authentication
        Basic Constraints: critical
            CA:FALSE
        Authority Information Access:
            CA Issuers - URI:http://ca.example/issuing-ca-1.crt
        CRL Distribution Points:
            URI:http://crl.ca.example/issuing-ca-1.crl
        CT Precertificate SCTs:
            Signed Certificate Timestamp: log A, Sep  1 2026
            Signed Certificate Timestamp: log B, Sep  1 2026
    Signature Value:
        30:45:02:21:00:c7:1e:...

Reading from the top, the serial number identifies this certificate among everything its CA has issued, which matters when the CA later needs to say that one particular certificate should no longer be trusted. The signature algorithm names how the CA signed it, here ECDSA over a SHA-256 hash, the same kind of signature as in Digital signatures. The issuer names the CA that signed it, and the validity period gives the first and last moments at which it should be accepted.

The subject names who the certificate is about, and the subject public key is Lab Photos' public key. This is the binding the whole certificate exists to make. The matching private key never appears in the certificate; it stays on Lab Photos' server or in its key hardware, as Storing and using keys described.

Between the key and the signature sit the extensions. The next section covers the ones that limit names and uses. The last three point beyond the certificate. The authority information access address says where to download the issuer's own certificate. The CRL distribution point says where the CA publishes its list of revoked certificates. The signed certificate timestamps are receipts showing that the certificate was recorded in public Certificate Transparency logs. Certificate authorities and chains and Validating a certificate explain why clients care about each one.

At the bottom, the signature is the CA's signature over everything above it. Changing any field, such as adding a hostname or extending the expiry, would make that signature fail.

Tools often show one more value that is not a field at all: the certificate's fingerprint, a hash such as SHA-256 of the whole certificate's bytes, the same kind of hash as in Encoding and hashing. Two copies with the same fingerprint are the same certificate, which makes it a short way to compare what two people received.

Names and permitted uses

HTTPS and certificates in practice showed how a client matches a hostname: against the subject alternative names, comparing whole names, with a wildcard standing for exactly one label. Applied to this certificate, its two names let Lab Photos use it for both the photo site and its sign-in pages, but not for www.photos.example, although that shares a parent domain. The names are also a decision about keys. A certificate for *.photos.example would mean fewer certificates to manage, at the cost of spreading one private key across every service that uses it, so a leak from any one of them exposes them all.

The key usage and extended key usage extensions limit what the key may be used for. This one allows digital signatures for authenticating a TLS server. The same format serves many other purposes: certificates can sign software, protect email, or identify a person on a smart card. They can also identify a TLS client. With the mutual TLS from HTTPS and certificates in practice, the server asks the client for a certificate of its own, and an application can present a client certificate to sign in instead of sending a secret. The permitted uses keep a certificate issued for one of these purposes from being accepted for another.

The basic constraints extension says CA:FALSE. Lab Photos may use this certificate to identify its server, but the key may not act as a certificate authority and sign certificates for other names. A CA's own certificate says CA:TRUE. A verifier enforces these extensions as rules, so a certificate marked CA:FALSE cannot vouch for anyone, however trustworthy its own issuer is.

What a certificate does not say

Most certificates on the web are domain validated. Before issuing one, the CA checked that the requester controlled the domain name, and nothing more. The certificate says that its key belongs to whoever controlled photos.example when the CA checked. CAs may reuse a successful check for a limited period, so that moment can come some time before the certificate was issued.

It does not say that Lab Photos is honest, or that photos.example is the site Ava meant to visit. A phishing site at a look-alike address such as photos-login.example can obtain a perfectly valid certificate for its own name. Some certificate types also record a validated organization name, but mainstream browsers no longer highlight it, and some have replaced the padlock with a neutral icon because many people read it as a sign that a site is trustworthy.

A certificate is also public. The server sends it to every visitor, and anyone can copy it. Possessing the certificate proves nothing; the server must also prove it holds the matching private key during the connection, with the signature HTTPS and certificates in practice called Certificate Verify. Whether to believe the CA's signature at all is a decision the client makes from its own list of trusted authorities, not something the certificate can say about itself.

Certificate

Certificate for photos.example

Key belongs to photos.example
Stated, signed by the CA
Server holds the private key
Still to check in the handshake
The CA deserves trust
Still to check: the client decides
Lab Photos is honest
Not established
The site Ava meant to visit
Not established

A look-alike site can hold a valid certificate for its own name.

A valid certificate states one binding. The rest is checked elsewhere, or not at all.

That is why an attacker who copies Lab Photos' certificate still cannot pass as photos.example, while an attacker who steals the private key can. The certificate is safe to hand to anyone; the private key behind it is what Lab Photos has to protect.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

A certificate lists photos.example and accounts.photos.example in its subject alternative names. Can it be used for www.photos.example? 1 of 3

Choose one answer.

Someone copies Lab Photos' certificate onto their own server. Can visitors complete a trusted HTTPS connection to that server as photos.example? 2 of 3

Choose one answer.

Ava follows a link to photos-login.example, which presents a valid, domain-validated certificate for that name. What does the certificate establish? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity