Ejemplo n.º 1
0
func makeProgramSubPrin(prog string) (auth.SubPrin, error) {
	// TODO(tmroeder): This assumes no IDs, and it assumes linux hosts.
	id := uint(0)
	h, err := hash(prog)
	if err != nil {
		return auth.SubPrin{}, err
	}
	return tao.FormatProcessSubprin(id, h), nil
}
Ejemplo n.º 2
0
func makeProgramSubPrin(prog string) (auth.SubPrin, error) {
	// TODO(tmroeder): This assumes no IDs, and it assumes linux hosts.
	id := uint(0)
	h, err := hash(prog)
	if err != nil {
		fmt.Fprintf(os.Stderr, "%s: Can't calculate subprin hash\n", err)
		return auth.SubPrin{}, err
	}
	return tao.FormatProcessSubprin(id, h), nil
}