veyron/services/identity: Remove unused pubkey route.

Change-Id: Iaf9b44c4beb43429e8f278497dda970648372db5
diff --git a/services/identity/handlers/handlers_test.go b/services/identity/handlers/handlers_test.go
index 477761d..9723a4f 100644
--- a/services/identity/handlers/handlers_test.go
+++ b/services/identity/handlers/handlers_test.go
@@ -3,7 +3,6 @@
 import (
 	"encoding/base64"
 	"encoding/json"
-	"io/ioutil"
 	"net/http"
 	"net/http/httptest"
 	"reflect"
@@ -13,34 +12,8 @@
 	"veyron.io/veyron/veyron2/security"
 
 	tsecurity "veyron.io/veyron/veyron/lib/testutil/security"
-	vsecurity "veyron.io/veyron/veyron/security"
 )
 
-func TestPublicKey(t *testing.T) {
-	p, err := vsecurity.NewPrincipal()
-	if err != nil {
-		t.Fatal(err)
-	}
-	key := p.PublicKey()
-	ts := httptest.NewServer(PublicKey{key})
-	defer ts.Close()
-	response, err := http.Get(ts.URL)
-	if err != nil {
-		t.Fatal(err)
-	}
-	bytes, err := ioutil.ReadAll(response.Body)
-	if err != nil {
-		t.Fatal(err)
-	}
-	got, err := security.UnmarshalPublicKey(bytes)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if want := key; !reflect.DeepEqual(got, want) {
-		t.Errorf("Got %v, want %v", got, want)
-	}
-}
-
 func TestBlessingRoot(t *testing.T) {
 	blessingNames := []string{"test-blessing-name-1", "test-blessing-name-2"}
 	p := tsecurity.NewPrincipal(blessingNames...)
diff --git a/services/identity/handlers/publickey.go b/services/identity/handlers/publickey.go
deleted file mode 100644
index 7ab8c96..0000000
--- a/services/identity/handlers/publickey.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package handlers
-
-import (
-	"net/http"
-
-	"veyron.io/veyron/veyron/services/identity/util"
-	"veyron.io/veyron/veyron2/security"
-)
-
-// PublicKey is an http.Handler implementation that renders a public key in
-// DER format.
-type PublicKey struct{ K security.PublicKey }
-
-func (h PublicKey) ServeHTTP(w http.ResponseWriter, r *http.Request) {
-	der, err := h.K.MarshalBinary()
-	if err != nil {
-		util.HTTPServerError(w, err)
-		return
-	}
-	w.Header().Set("Content-Type", "application/octet-stream")
-	w.Header().Set("Content-Disposition", "attachment; filename=publickey.der")
-	w.Write(der)
-}
diff --git a/services/identity/server/identityd.go b/services/identity/server/identityd.go
index 17f5551..6e767f4 100644
--- a/services/identity/server/identityd.go
+++ b/services/identity/server/identityd.go
@@ -38,7 +38,7 @@
 	// Flags controlling the HTTP server
 	httpaddr  = flag.String("httpaddr", "localhost:8125", "Address on which the HTTP server listens on.")
 	tlsconfig = flag.String("tlsconfig", "", "Comma-separated list of TLS certificate and private key files. This must be provided.")
-	host      = flag.String("host", defaultHost(), "Hostname the HTTP server listens on. This can be the name of the host running the webserver, but if running behind a NAT or load balancer, this should be the host name that clients will connect to. For example, if set to 'x.com', Veyron identities will have the IssuerName set to 'x.com' and clients can expect to find the public key of the signer at 'x.com/pubkey'.")
+	host      = flag.String("host", defaultHost(), "Hostname the HTTP server listens on. This can be the name of the host running the webserver, but if running behind a NAT or load balancer, this should be the host name that clients will connect to. For example, if set to 'x.com', Veyron identities will have the IssuerName set to 'x.com' and clients can expect to find the root name and public key of the signer at 'x.com/blessing-root'.")
 )
 
 const (
@@ -80,9 +80,7 @@
 	defer runtime.Cleanup()
 
 	// Setup handlers
-	// TODO(nlacasse,ataly,suharshs): Remove the 'pubkey' route if it's no longer needed.
-	http.Handle("/pubkey", handlers.PublicKey{runtime.Principal().PublicKey()}) // public key of this server
-	http.Handle("/blessing-root", handlers.BlessingRoot{runtime.Principal()})   // json-encoded public key and blessing names of this server
+	http.Handle("/blessing-root", handlers.BlessingRoot{runtime.Principal()}) // json-encoded public key and blessing names of this server
 
 	macaroonKey := make([]byte, 32)
 	if _, err := rand.Read(macaroonKey); err != nil {
@@ -256,8 +254,10 @@
 <div class="well">
 This is a Veyron identity provider that provides blessings with the name prefix <mark>{{.Self}}</mark>.
 <br/>
-The public key of this provider is {{.Self.PublicKey}}, which is available in <a class="btn btn-xs btn-primary" href="/pubkey">DER</a> encoded
-<a href="http://en.wikipedia.org/wiki/X.690#DER_encoding">format</a>.
+The public key of this provider is {{.Self.PublicKey}}.
+<br/>
+The root names and public key (in DER encoded <a href="http://en.wikipedia.org/wiki/X.690#DER_encoding">format</a>)
+are available in a <a class="btn btn-xs btn-primary" href="/blessing-root">JSON</a> object.
 </div>
 
 <div class="well">