puppeth: handle encrypted ssh keys (closes #15442) (#15443)

* cmd/puppeth: handle encrypted ssh keys

* cmd/puppeth: fix unconvert linter error
This commit is contained in:
Bo
2017-11-12 12:24:42 -08:00
committed by Péter Szilágyi
parent f47adc9ea8
commit cb8bbe7081
238 changed files with 51248 additions and 27691 deletions

View File

@ -1,4 +1,4 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@ -13,9 +13,10 @@ import "unsafe"
// Round the length of a raw sockaddr up to align it properly.
func cmsgAlignOf(salen int) int {
salign := sizeofPtr
// NOTE: It seems like 64-bit Darwin and DragonFly BSD kernels
// still require 32-bit aligned access to network subsystem.
if darwin64Bit || dragonfly64Bit {
// NOTE: It seems like 64-bit Darwin, DragonFly BSD and
// Solaris kernels still require 32-bit aligned access to
// network subsystem.
if darwin64Bit || dragonfly64Bit || solaris64Bit {
salign = 4
}
return (salen + salign - 1) & ^(salign - 1)