Skip to content

Commit

Permalink
Add Apache License to files (matthewstevenson88#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryanfsdf authored Jul 22, 2020
1 parent b1ce5d4 commit 8a51020
Show file tree
Hide file tree
Showing 24 changed files with 452 additions and 11 deletions.
19 changes: 19 additions & 0 deletions security/s2a/internal/authinfo/authinfo.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package authinfo

import (
"errors"

"google.golang.org/grpc/credentials"
s2apb "google.golang.org/grpc/security/s2a/internal/proto"
)
Expand Down
21 changes: 20 additions & 1 deletion security/s2a/internal/authinfo/authinfo_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package authinfo

import (
"bytes"
s2apb "google.golang.org/grpc/security/s2a/internal/proto"
"testing"

s2apb "google.golang.org/grpc/security/s2a/internal/proto"
)

func TestS2AAuthInfo(t *testing.T) {
Expand Down
18 changes: 18 additions & 0 deletions security/s2a/internal/fakehandshaker/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package main

import (
Expand Down
18 changes: 18 additions & 0 deletions security/s2a/internal/fakehandshaker/s2a_service.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package main

import (
Expand Down
18 changes: 18 additions & 0 deletions security/s2a/internal/fakehandshaker/s2a_service_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package main

import (
Expand Down
18 changes: 18 additions & 0 deletions security/s2a/internal/record/internal/aeadcrypter/aeadcrypter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package aeadcrypter

// S2AAEADCrypter is the interface for an AEAD cipher used by the S2A record
Expand Down
18 changes: 18 additions & 0 deletions security/s2a/internal/record/internal/aeadcrypter/common.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package aeadcrypter

import (
Expand Down
21 changes: 20 additions & 1 deletion security/s2a/internal/record/internal/aeadcrypter/common_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package aeadcrypter

import (
"bytes"
"google.golang.org/grpc/security/s2a/internal/record/internal/aeadcrypter/testutil"
"testing"

"google.golang.org/grpc/security/s2a/internal/record/internal/aeadcrypter/testutil"
)

// fakeAEAD is a fake implementation of an AEAD interface used for testing.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package testutil

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package testutil

import (
Expand Down
21 changes: 20 additions & 1 deletion security/s2a/internal/record/internal/halfconn/ciphersuite.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package halfconn

import (
"crypto/sha256"
"crypto/sha512"
"fmt"
"hash"

s2apb "google.golang.org/grpc/security/s2a/internal/proto"
"google.golang.org/grpc/security/s2a/internal/record/internal/aeadcrypter"
"hash"
)

// ciphersuite is the interface for retrieving ciphersuite-specific information
Expand Down
25 changes: 22 additions & 3 deletions security/s2a/internal/record/internal/halfconn/ciphersuite_test.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package halfconn

import (
"crypto/sha256"
"crypto/sha512"
s2apb "google.golang.org/grpc/security/s2a/internal/proto"
"google.golang.org/grpc/security/s2a/internal/record/internal/aeadcrypter"
"google.golang.org/grpc/security/s2a/internal/record/internal/aeadcrypter/testutil"
"hash"
"reflect"
"testing"

s2apb "google.golang.org/grpc/security/s2a/internal/proto"
"google.golang.org/grpc/security/s2a/internal/record/internal/aeadcrypter"
"google.golang.org/grpc/security/s2a/internal/record/internal/aeadcrypter/testutil"
)

func TestCiphersuites(t *testing.T) {
Expand Down
18 changes: 18 additions & 0 deletions security/s2a/internal/record/internal/halfconn/counter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package halfconn

import "errors"
Expand Down
18 changes: 18 additions & 0 deletions security/s2a/internal/record/internal/halfconn/counter_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package halfconn

import (
Expand Down
21 changes: 20 additions & 1 deletion security/s2a/internal/record/internal/halfconn/expander.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
/*
*
* Copyright 2020 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package halfconn

import (
"fmt"
"golang.org/x/crypto/hkdf"
"hash"

"golang.org/x/crypto/hkdf"
)

// hkdfExpander is the interface for the HKDF expansion function; see
Expand Down
Loading

0 comments on commit 8a51020

Please sign in to comment.