aia

package module
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2025 License: MIT Imports: 7 Imported by: 9 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

AIA (Authority Information Access) Transport Go

GoDoc Go Report Card GolangCI

AIA-Transport-Go provides an http.Transport which uses the AIA (Authority Information Access) X.509 extension to resolve incomplete certificate chains during the tls handshake. See rfc3280 for more details.

Installation

go get github.com/fcjr/aia-transport-go

Usage

tr, err := aia.NewTransport()
if err != nil {
    log.Fatal(err)
}
client := http.Client{
    Transport: tr,
}
res, err := client.Get("https://incomplete-chain.badssl.com/")
if err != nil {
    log.Fatal(err)
}
fmt.Println(res.Status)

Todos

  • Follow single incomplete AIA chain
  • Tests
  • CI & Code Coverage
  • Documentation
  • Chain Caching
  • Certificate Caching
  • Follow all possible issuing urls
  • Benchmarks

Documentation

Overview

Package aia provides an http.Transport which uses the AIA (Authority Information Access) X.509 extension to resolve incomplete certificate chains during the tls handshake. See https://tools.ietf.org/html/rfc3280#section-4.2.2.1 for more details.

Usage

To use simply create a new transport via NewTransport() and use it in your http.Client.

tr, err := aia.NewTransport()
if err != nil {
  log.Fatal(err)
}
client := http.Client{
  Transport: tr,
}
res, err := client.Get("https://incomplete-chain.badssl.com/")
if err != nil {
  log.Fatal(err)
}
fmt.Println(res.Status)

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransport

func NewTransport() (*http.Transport, error)

NewTransport returns a http.Transport that supports AIA (Authority Information Access) resolution for incomplete certificate chains.

Example
package main

import (
	"fmt"
	"log"
	"net/http"

	"github.com/fcjr/aia-transport-go"
)

func main() {
	tr, err := aia.NewTransport()
	if err != nil {
		log.Fatal(err)
	}
	client := http.Client{
		Transport: tr,
	}
	res, err := client.Get("https://incomplete-chain.badssl.com/")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(res.Status)

}
Output:
200 OK

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址