Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Apache License to files #54

Merged
merged 1 commit into from
Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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