Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Deprecate this repository #26

Merged
merged 1 commit into from
Oct 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

44 changes: 2 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,3 @@
# Package pkcs12
# PACKAGE DEPRECATED

[![GoDoc](https://godoc.org/github.com/Azure/go-pkcs12?status.svg)](https://godoc.org/github.com/Azure/go-pkcs12)

Package pkcs12 provides some Go implementations of PKCS#12.

This implementation is distilled from https://tools.ietf.org/html/rfc7292 and referenced documents.
It is intented for decoding P12/PFX-stored certificate+key for use with the crypto/tls package.

## Example

```go
p12, err := base64.StdEncoding.DecodeString(`base64-encoded-pfx-file`)
if err != nil {
panic(err)
}

blocks, err := pkcs12.ConvertToPEM(p12, passwordBytes)
if err != nil {
panic(err)
}
for i := 0; i < len(passwordBytes); i++ {
passwordBytes[i] = 0 // clear password data after use
}

pemData := []byte{}
for _, b := range blocks {
pemData = append(pemData, pem.EncodeToMemory(b)...)
}

// then use PEM data for tls to construct tls certificate:

cert, err := tls.X509KeyPair(pemData, pemData)
if err != nil {
panic(err)
}

config := tls.Config{
Certificates: []tls.Certificate{cert},
}

// use tls config for http client
```
This package was [merged into the Go x/crypto repository](https://github.com/golang/crypto/pkcs12). Please switch to the implementation there.
49 changes: 0 additions & 49 deletions bmp-string.go

This file was deleted.

42 changes: 0 additions & 42 deletions bmp-string_test.go

This file was deleted.

95 changes: 0 additions & 95 deletions crypto.go

This file was deleted.

108 changes: 0 additions & 108 deletions crypto_test.go

This file was deleted.

5 changes: 5 additions & 0 deletions error.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package error

func error() {
`ERROR: the correct import path is golang.org/x/crypto/pkcs12 ... `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for ... ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

analogous to amz. Besides, I love '...' most of my text messages end in '...'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like txting but I'll let that slide lol

}
19 changes: 0 additions & 19 deletions errors.go

This file was deleted.

Loading