This repository has been archived by the owner on Feb 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Deprecate this repository #26
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ... ` | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for
...
?There was a problem hiding this comment.
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 '...'
There was a problem hiding this comment.
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