Fix gob register issue when using tls certs on plugins (#3060)
This commit is contained in:
parent
ba9bd5a2c7
commit
40c1c93937
|
@ -1,6 +1,9 @@
|
|||
package plugin
|
||||
|
||||
import (
|
||||
"crypto/ecdsa"
|
||||
"crypto/rsa"
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
|
||||
"sync"
|
||||
|
@ -10,6 +13,13 @@ import (
|
|||
"github.com/hashicorp/vault/logical"
|
||||
)
|
||||
|
||||
// Register these types since we have to serialize and de-serialize tls.ConnectionState
|
||||
// over the wire as part of logical.Request.Connection.
|
||||
func init() {
|
||||
gob.Register(rsa.PublicKey{})
|
||||
gob.Register(ecdsa.PublicKey{})
|
||||
}
|
||||
|
||||
// BackendPluginClient is a wrapper around backendPluginClient
|
||||
// that also contains its plugin.Client instance. It's primarily
|
||||
// used to cleanly kill the client on Cleanup()
|
||||
|
|
Loading…
Reference in a new issue