Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>SSLensNew to Visual Studio Code? Get it now.
SSLens

SSLens

sitharaj

|
157 installs
| (0) | Free
Modern SSL/TLS certificate inspector & pinning toolkit with GitHub Copilot integration. Fetch, analyze, and export certificates with ease. Perfect for mobile developers.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🔍 SSLens for VS Code

SSLens Logo

Modern SSL/TLS Certificate Inspector & Pinning Toolkit
Fetch, analyze, and export certificates with ease

📚 Explore the Docs »

Documentation • Features • Installation • Usage • Commands • Pinning Code

Version License VS Code Copilot Claude Code MCP


Feature Feature Feature Feature


🎯 Why SSLens?

Problem SSLens Solution
🔴 Manually extracting SSL hashes ✅ One-click hash generation
🔴 Writing pinning code from scratch ✅ Ready-to-use code for 7 platforms
🔴 Checking certificate expiry manually ✅ Visual expiry monitoring
🔴 Comparing staging vs production certs ✅ Built-in comparison tool
🔴 Managing multiple domain certificates ✅ Save favorites & bulk fetch
🔴 Context-switching to terminal/openssl ✅ Ask @sslens right in Copilot Chat

✨ Features

🔍 Certificate Inspection

  • Fetch SSL certificates from any domain
  • Security grade (A+…F) with detailed findings
  • View complete certificate chain interactively
  • TLS protocol & cipher suite from the live handshake
  • Inspect subject, issuer, validity, extensions
  • Custom port support (not just 443)
  • SNI support · theme-aware native UI

📌 Certificate Pinning

  • One-click hash generation
  • Public Key Hash (SHA-256 Base64)
  • SPKI Hash for modern pinning
  • Ready-to-use code for:
    • Android (OkHttp, Retrofit)
    • iOS (URLSession, Alamofire)
    • Flutter (Dio, http)
    • React Native

📤 Export Options

  • Export as PEM format
  • Export as DER format
  • Export entire chain as PEM bundle
  • Export all chain certs as separate DER files
  • Export individual chain certificates
  • Copy fingerprints (SHA-256, SHA-1, MD5)

📥 Import & Inspect

  • Import local certificate files
  • Support for .pem, .crt, .cer, .der formats
  • Parse certificate chains from single file
  • Full X.509 details extraction
  • Same features as fetched certificates

⏰ Expiry Monitoring

  • Visual status (🟢 🟡 🔴)
  • Batch expiry check
  • Days-until-expiry tracking
  • Warning badges

🎨 Modern UI

  • Emerald green security-focused theme
  • Certificate chain breadcrumb navigation
  • Hover export buttons per chain cert
  • Glassmorphism design
  • Smooth animations

🤖 GitHub Copilot Integration NEW

  • @sslens chat participant — inspect, compare, and pin certificates conversationally
  • AI security assessments of live certificate chains, powered by your Copilot model
  • Agent-mode tools — Copilot can fetch certificates, check expiry, and generate pinning code on its own (#sslCertificate, #sslPinningCode, #sslExpiry, #sslSavedDomains)
  • Works without Copilot too — falls back to rich structured reports

📋 Domain Management

  • Save favorite domains for quick access
  • Track certificate changes over time
  • Bulk fetch from multiple domains
  • Compare certificates between environments
  • Import/Export domain lists as JSON

📥 Installation

From VS Code Marketplace

1. Open VS Code
2. Go to Extensions (Cmd+Shift+X / Ctrl+Shift+X)
3. Search for "SSLens"
4. Click Install

From VSIX

code --install-extension sslens-1.2.0.vsix

🚀 Usage

Quick Start

1. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
2. Type "SSLens: Fetch Certificate from URL"
3. Enter a domain (e.g., api.github.com)
4. View certificate details in the beautiful panel

From Sidebar

  1. Click the SSLens icon in the Activity Bar (🛡️ shield icon)
  2. Click the + button to add a domain
  3. Click any saved domain to fetch its certificate

Status Bar

Click 🛡️ SSLens in the status bar to quickly fetch a certificate!


🤖 Using SSLens with GitHub Copilot

Type @sslens in Copilot Chat:

@sslens /check api.example.com          → fetch + AI security assessment
@sslens /pin api.example.com for okhttp → live SPKI hashes + pinning code
@sslens /expiry                         → expiry report for your saved domains
@sslens /compare example.com example.org
@sslens is the cert for myapi.com safe to pin?

In agent mode, Copilot calls SSLens tools automatically whenever a task involves SSL/TLS certificates — or reference them explicitly:

Tool What it does
#sslCertificate Fetch & inspect a live certificate chain
#sslPinningCode Generate pinning code with live SPKI hashes
#sslExpiry Check expiry for up to 25 hosts at once
#sslSavedDomains List your saved SSLens domains

💡 No Copilot? Everything still works — @sslens falls back to structured reports, and all classic commands are AI-free.


🤝 Using SSLens with Claude Code

SSLens bundles a Model Context Protocol (MCP) server, so AI agents outside VS Code — Claude Code, Claude Desktop, Cursor — can use its certificate tools too.

Run SSLens: Install MCP Server for Claude Code from the Command Palette. SSLens registers the bundled server with the claude CLI in one step, or falls back to writing .mcp.json / your global config if the CLI isn't installed.

Then ask Claude naturally:

inspect the TLS certificate for api.github.com and tell me if it's safe to pin
generate OkHttp pinning code for api.example.com with backup pins
are the certs for example.com and api.example.com expiring soon?
compare the certificates on staging.myapp.com and myapp.com
MCP Tool What it does
inspect_certificate Live chain + TLS protocol/cipher + A+…F security grade
check_expiry Bulk expiry for up to 25 hosts
generate_pinning_code Live SPKI hashes → pinning code for 7 platforms
compare_certificates Field-by-field diff of two hosts
inspect_pem Parse PEM text offline (no network)

See mcp/README.md for manual setup, Claude Desktop config, and environment variables.


📝 Commands

Command Description
SSLens: Fetch Certificate from URL Fetch certificate from a domain
SSLens: Inspect Local Certificate File Parse a local .pem/.crt file
SSLens: Generate Pinning Code Generate platform-specific code
SSLens: Export as PEM Export certificate as PEM
SSLens: Export as DER Export certificate as DER
SSLens: Copy Public Key Hash Copy SHA-256 hash for pinning
SSLens: Copy SPKI Hash Copy SPKI hash
SSLens: Bulk Fetch Certificates Fetch from multiple domains
SSLens: Compare Two Certificates Compare staging vs production
SSLens: Check Certificate Expiry Check all saved domains
SSLens: Validate Certificate Chain Validate chain integrity
SSLens: Save Domain to Favorites Add to saved domains
SSLens: Export Saved Domains Export domains to JSON
SSLens: Import Saved Domains Import domains from JSON
SSLens: Ask Copilot About a Certificate Open Copilot Chat pre-filled with @sslens /check
SSLens: Install MCP Server for Claude Code Register the bundled MCP server with Claude Code
SSLens: Inspect Certificate in Active Editor Parse the PEM open in the current editor
SSLens: Clear Recent Certificates Empty the recent-certificates list

🛠️ Pinning Code Examples

SSLens generates ready-to-use pinning code for all major platforms:

🤖 Android (OkHttp/Retrofit)
import okhttp3.CertificatePinner
import okhttp3.OkHttpClient

val certificatePinner = CertificatePinner.Builder()
    .add("api.example.com", "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=")
    // Add backup pin for certificate rotation
    .add("api.example.com", "sha256/BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=")
    .build()

val client = OkHttpClient.Builder()
    .certificatePinner(certificatePinner)
    .build()
🍎 iOS (Swift URLSession)
import Foundation
import CryptoKit

class SSLPinningDelegate: NSObject, URLSessionDelegate {
    private let pinnedHashes: Set<String> = [
        "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
    ]
    
    func urlSession(
        _ session: URLSession,
        didReceive challenge: URLAuthenticationChallenge,
        completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
    ) {
        guard let serverTrust = challenge.protectionSpace.serverTrust else {
            completionHandler(.cancelAuthenticationChallenge, nil)
            return
        }
        
        // Validate public key hash against pinned hashes
        let certificateCount = SecTrustGetCertificateCount(serverTrust)
        for index in 0..<certificateCount {
            if let cert = SecTrustGetCertificateAtIndex(serverTrust, index),
               let publicKey = SecCertificateCopyKey(cert),
               let keyData = SecKeyCopyExternalRepresentation(publicKey, nil) as Data? {
                let hash = SHA256.hash(data: keyData)
                if pinnedHashes.contains(Data(hash).base64EncodedString()) {
                    completionHandler(.useCredential, URLCredential(trust: serverTrust))
                    return
                }
            }
        }
        completionHandler(.cancelAuthenticationChallenge, nil)
    }
}
🐦 Flutter (Dio)
import 'dart:io';
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:dio/io.dart';
import 'package:crypto/crypto.dart';

final pinnedHashes = ['AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA='];

Dio createSecureDio() {
  final dio = Dio();
  
  dio.httpClientAdapter = IOHttpClientAdapter(
    createHttpClient: () {
      final client = HttpClient();
      client.badCertificateCallback = (cert, host, port) {
        final hash = base64Encode(sha256.convert(cert.der).bytes);
        return pinnedHashes.contains(hash);
      };
      return client;
    },
  );
  
  return dio;
}
⚛️ React Native
// Using react-native-ssl-pinning
import { fetch } from 'react-native-ssl-pinning';

const response = await fetch('https://api.example.com/endpoint', {
  method: 'GET',
  sslPinning: {
    certs: ['my_certificate'], // Certificate file name in assets
  },
});

// Or use Android network_security_config.xml:
// <pin digest="SHA-256">AAAAAAA...=</pin>

⚙️ Configuration

{
  "sslens.defaultPort": 443,
  "sslens.timeout": 10000,
  "sslens.maxRecentItems": 10,
  "sslens.showExpiryWarnings": true,
  "sslens.autoRefresh": false
}
Setting Default Description
defaultPort 443 Default port for connections
timeout 10000 Connection timeout (ms)
maxRecentItems 10 Max recent certificates to keep
showExpiryWarnings true Show warnings for expiring certs
autoRefresh false Auto-refresh domains on startup

🔒 Security

✅ Certificates stored locally only
✅ No data sent to external servers
✅ Uses system's trust store
✅ Self-signed certs can be inspected
✅ Open source and auditable

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

# Fork the repository
git clone https://github.com/sitharaj88/sslens.git
cd sslens

# Create your feature branch
git checkout -b feature/AmazingFeature

# Commit your changes
git commit -m 'Add some AmazingFeature'

# Push to the branch
git push origin feature/AmazingFeature

# Open a Pull Request

📄 License

MIT License - see the LICENSE file for details.


Made with 💚 by Sitharaj

Buy Me A Coffee

⭐ Star on GitHub • 🐛 Report Bug • 💡 Request Feature

🔍 SSLens — The SSL/TLS toolkit every developer needs

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft