Skip to content

Commit

Permalink
LICENSE conformance
Browse files Browse the repository at this point in the history
  • Loading branch information
kylelemons committed Oct 2, 2013
1 parent 7a1d58d commit cca0d50
Show file tree
Hide file tree
Showing 27 changed files with 187 additions and 36 deletions.
48 changes: 25 additions & 23 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
Copyright (c) 2012, Kyle Lemons
All rights reserved.
Copyright 2013, Google Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6 changes: 6 additions & 0 deletions codec/codec.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package codec

import (
Expand Down
6 changes: 6 additions & 0 deletions codec/codec_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package codec

import (
Expand Down
6 changes: 6 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

// The go-rpcgen project is an attempt to create an easy-to-use, open source
// protobuf service binding for the standard Go RPC package. It provides a
// protoc-gen-go (based on the standard "main" from goprotobuf and leveraging
Expand Down
6 changes: 6 additions & 0 deletions example_ae/app/server.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

// +build appengine

package server
Expand Down
6 changes: 6 additions & 0 deletions example_ae/client/client.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

// +build !appengine

package main
Expand Down
8 changes: 4 additions & 4 deletions example_ae/whoami/whoami.ae.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions examples/add/add.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package main

import (
Expand Down Expand Up @@ -41,12 +47,12 @@ func handleClient(conn net.Conn) {
log.Print("server: conn: Handshake completed")
}
state := tlscon.ConnectionState()
// Note we could reject clients if we don't like their public key.
// Note we could reject clients if we don't like their public key.
for _, v := range state.PeerCertificates {
log.Printf("Client: Server public key is:\n%x\n", v.PublicKey.(*rsa.PublicKey).N)
// log.Printf("Server: client cert chain %s", v.Subject.ToRDNSequence())
}
// Now that we have completed SSL/TLS
// Now that we have completed SSL/TLS
addservice.ServeAddService(tlscon, Add{})
}
}
Expand Down
19 changes: 12 additions & 7 deletions examples/add/client/client.go
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package main

import (
"crypto/tls"
"crypto/rsa"
"crypto/tls"
"flag"
"fmt"
"log"
"flag"

"github.com/kylelemons/go-rpcgen/examples/add/addservice"
)

var (
certDir = flag.String("certdir","certs","The directory to load the X509 certificates from")
var (
certDir = flag.String("certdir", "certs", "The directory to load the X509 certificates from")
)


func openTLSClient(ipPort string) (*tls.Conn, error) {

// Note this loads standard x509 certificates, test keys can be
// generated with makecert.sh

log.Printf("Loading certificates from directory: %s\n",*certDir)
log.Printf("Loading certificates from directory: %s\n", *certDir)
cert, err := tls.LoadX509KeyPair(*certDir+"/server.pem", *certDir+"/server.key")
if err != nil {
log.Fatalf("server: loadkeys: %s", err)
Expand All @@ -36,7 +41,7 @@ func openTLSClient(ipPort string) (*tls.Conn, error) {
// we could terminate the connection based on the public key if desired.
state := conn.ConnectionState()
for _, v := range state.PeerCertificates {
log.Printf("Client: Server public key is:\n%x\n",v.PublicKey.(*rsa.PublicKey).N)
log.Printf("Client: Server public key is:\n%x\n", v.PublicKey.(*rsa.PublicKey).N)

}
// Lets verify behind the doubt that both ends of the connection
Expand Down
6 changes: 6 additions & 0 deletions examples/echo/client/client.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package main

import (
Expand Down
6 changes: 6 additions & 0 deletions examples/echo/echo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package main

import (
Expand Down
6 changes: 6 additions & 0 deletions examples/echo/echo_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package main

import (
Expand Down
6 changes: 6 additions & 0 deletions examples/remote/client/client.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package main

import (
Expand Down
6 changes: 6 additions & 0 deletions examples/remote/remote.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package main

import (
Expand Down
6 changes: 6 additions & 0 deletions examples/remote/remote_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package main

import (
Expand Down
6 changes: 6 additions & 0 deletions plugin/common.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package plugin

import (
Expand Down
6 changes: 6 additions & 0 deletions plugin/common_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package plugin

import (
Expand Down
6 changes: 6 additions & 0 deletions plugin/plugin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

// Package plugin implements a plugin for protoc-gen-go that generates
// RPC stubs for use with the the net/rpc package.
//
Expand Down
6 changes: 6 additions & 0 deletions plugin/plugin_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package plugin

import (
Expand Down
6 changes: 6 additions & 0 deletions plugin/rpc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package plugin

import (
Expand Down
6 changes: 6 additions & 0 deletions plugin/rpc_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package plugin

import (
Expand Down
6 changes: 6 additions & 0 deletions plugin/web.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package plugin

import (
Expand Down
6 changes: 6 additions & 0 deletions plugin/web_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package plugin

import (
Expand Down
6 changes: 6 additions & 0 deletions webrpc/gob.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package webrpc

import (
Expand Down
6 changes: 6 additions & 0 deletions webrpc/json.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package webrpc

import (
Expand Down
6 changes: 6 additions & 0 deletions webrpc/proto.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

// +build !appengine

package webrpc
Expand Down
6 changes: 6 additions & 0 deletions webrpc/webrpc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2013 Google. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

// Package webrpc implements a web-based JSON, Gob and ProtoBuf RPC protocol
// roughly compatible with google-protorpc. It works in tandem with the
// go-rpcgen protoc-gen-go plugin, which generates the bindings.
Expand Down

0 comments on commit cca0d50

Please sign in to comment.