 +}
 diff --git a/apps/fileproxy/fileproxymessages.proto b/apps/fileproxy/fileproxymessages.proto
 new file mode 100644
-index 0000000..ba0aaa6
+index 0000000..be1c6ab
 --- /dev/null
 +++ b/apps/fileproxy/fileproxymessages.proto
-@@ -0,0 +1,52 @@
+@@ -0,0 +1,59 @@
 +//  Copyright (c) 2013, Google Inc.  All rights reserved.
 +//
 +// Licensed under the Apache License, Version 2.0 (the "License");

+	}
+}
+
+// returns sealed symmetric key, sealed signing key, DER encoded cert, delegation, error
+func GetMyCryptoMaterial(path string) ([]byte, []byte, []byte, []byte, error) {
+	// stat domain.config
+	fileinfo, err := os.Stat(path + "sealedsymmetrickey")
+	if err != nil {
+		return nil, nil, nil, nil, err
+	}
+	fmt.Printf("fileproxy: Size of %s is %d\n", path+"sealedsymmetricKey", fileinfo.Size())
+	fileinfo, err = os.Stat(path + "sealedsigningKey")
+	if err != nil {
+		return nil, nil, nil, nil, err
+	}
+	fmt.Printf("fileproxy: Size of %s is %d\n", path+"sealedsigningKey", fileinfo.Size())
+	fileinfo, err = os.Stat(path + "signerCert")
+	if err != nil {
+		return nil, nil, nil, nil, err
+	}
+	fmt.Printf("fileproxy: Size of %s is %d\n", path+"signerCert", fileinfo.Size())
+
+	sealedSymmetricKey, err := ioutil.ReadFile(path + "sealedsymmetricKey")
+	if err != nil {
+		return nil, nil, nil, nil, err
+	}
+	fmt.Printf("fileproxy: Got sealedSymmetricKey\n")
+	sealedSigningKey, err := ioutil.ReadFile(path + "sealedsigningKey")
+	fmt.Printf("sealedSigningKey: ", sealedSigningKey)
+	fmt.Printf("\n")
+	if err != nil {
+		return nil, nil, nil, nil, err
+	}
+	fmt.Printf("fileproxy: Got sealedSigningKey\n")
+	derCert, err := ioutil.ReadFile(path + "signerCert")
+	if err != nil {
+		return nil, nil, nil, nil, err
+	}
+	fmt.Printf("fileproxy: Got signerCert\n")
+	ds, err := ioutil.ReadFile(path + "delegationBlob")
+	if err != nil {
+		return nil, nil, nil, nil, err
+	}
+	fmt.Printf(" GetMyCryptoMaterial succeeded\n")
+	return sealedSymmetricKey, sealedSigningKey, derCert, ds, nil
+}
+
+func CreateSigningKey(t tao.Tao) (*tao.Keys, []byte, error) {
+	self, err := t.GetTaoName()
+	k, err := tao.NewTemporaryKeys(tao.Signing)
+	if k == nil || err != nil {
+		return nil, nil, errors.New("Cant generate signing key")
+	}
+	publicString := strings.Replace(self.String(), "(", "", -1)
+	publicString = strings.Replace(publicString, ")", "", -1)
+	fmt.Printf("fileclient, publicString: %s\n", publicString)
+	details := tao.X509Details{
+		Country:      "US",
+		Organization: "Google",

+	rInfo.PrintResourceInfo()
+	status := "succeeded"
+	SendResponse(ms, status, "", 0)
+	return nil
+}
+
+func newruleRequest(m *ResourceMaster, ms *util.MessageStream,
+	rule string, signerCert []byte) error {
+
+	log.Printf("filehandler, newruleRequest, rule: %s\n", rule)
+	signerName := PrincipalNameFromDERCert(signerCert)
+	if signerName == nil {
+		log.Printf("filehandler, newruleRequest: cant get name from cert\n")
+		return nil
+	}
+	prin, err := m.FindPrincipal(*signerName)
+	if prin != nil {
+		log.Printf("filehandler, newRuleRequest: found principal, %s %s\n", prin.Name, prin.Status)
+	}
+	if err != nil || prin == nil || !bytes.Equal(prin.Der, signerCert) {
+		SendResponse(ms, "failed", "cert doesn't match", 0)
+		return nil
+	}
+	// Check a signature?
+	m.Guard.AddRule(rule)
+	SendResponse(ms, "succeeded", "", 0)
+	return nil
+}
+
