-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split things up so that proxy code can static link
- Loading branch information
Showing
8 changed files
with
183 additions
and
177 deletions.
There are no files selected for viewing
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 @@ | ||
set -x | ||
go build proxy-client.go proxy-misc.go | ||
go build proxy-server.go proxy-misc.go | ||
go build gss-client.go gss-misc.go | ||
go build gss-server.go gss-misc.go |
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
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,56 @@ | ||
package main | ||
|
||
import "fmt" | ||
import "gss" | ||
import "io" | ||
import "encoding/asn1" | ||
|
||
/* DisplayError prints error messages associated with the passed-in major and minor error codes. */ | ||
func DisplayGSSError(when string, major, minor uint32, mech *asn1.ObjectIdentifier) { | ||
fmt.Print(gss.DisplayStatus(major, gss.C_GSS_CODE, nil)) | ||
fmt.Printf(" ") | ||
if len(when) > 0 { | ||
fmt.Printf("while %s", when) | ||
} | ||
fmt.Printf("\n") | ||
if mech != nil { | ||
fmt.Print(gss.DisplayStatus(major, gss.C_MECH_CODE, *mech)) | ||
fmt.Printf("\n") | ||
} | ||
} | ||
|
||
/* DisplayGSSFlags logs the contents of the passed-in flags. */ | ||
func DisplayGSSFlags(flags gss.Flags, complete bool, file io.Writer) { | ||
if flags.Deleg { | ||
fmt.Fprintf(file, "context flag: GSS_C_DELEG_FLAG\n") | ||
} | ||
if flags.DelegPolicy { | ||
fmt.Fprintf(file, "context flag: GSS_C_DELEG_POLICY_FLAG\n") | ||
} | ||
if flags.Mutual { | ||
fmt.Fprintf(file, "context flag: GSS_C_MUTUAL_FLAG\n") | ||
} | ||
if flags.Replay { | ||
fmt.Fprintf(file, "context flag: GSS_C_REPLAY_FLAG\n") | ||
} | ||
if flags.Sequence { | ||
fmt.Fprintf(file, "context flag: GSS_C_SEQUENCE_FLAG\n") | ||
} | ||
if flags.Anon { | ||
fmt.Fprintf(file, "context flag: GSS_C_ANON_FLAG\n") | ||
} | ||
if flags.Conf { | ||
fmt.Fprintf(file, "context flag: GSS_C_CONF_FLAG \n") | ||
} | ||
if flags.Integ { | ||
fmt.Fprintf(file, "context flag: GSS_C_INTEG_FLAG \n") | ||
} | ||
if complete { | ||
if flags.Trans { | ||
fmt.Fprintf(file, "context flag: GSS_C_TRANS_FLAG \n") | ||
} | ||
if flags.ProtReady { | ||
fmt.Fprintf(file, "context flag: GSS_C_PROT_READY_FLAG \n") | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.