diff options
author | Andy Zhao <andyzhao@google.com> | 2023-02-07 14:50:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 14:50:29 -0800 |
commit | b022fa5bf44af935a4328ae8579a2bdb57f10ab7 (patch) | |
tree | 22d7a53a4e4d9488ec91c644b7ea26d1be71724a | |
parent | acff0978dad6ada9a5d4a1616ba3020bfc861f1e (diff) | |
download | googleapis-enterprise-certificate-proxy-b022fa5bf44af935a4328ae8579a2bdb57f10ab7.tar.gz |
chore: Update license headers to be cross-compliant (#64)
26 files changed, 328 insertions, 19 deletions
diff --git a/build/scripts/darwin_amd64.sh b/build/scripts/darwin_amd64.sh index eeb1032..baec3b1 100755 --- a/build/scripts/darwin_amd64.sh +++ b/build/scripts/darwin_amd64.sh @@ -1,5 +1,18 @@ #!/bin/bash +# Copyright 2022 Google LLC. +# 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 +# +# https://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. + set -eu # Create a folder to hold the binaries diff --git a/build/scripts/darwin_arm64.sh b/build/scripts/darwin_arm64.sh index 440f5b0..efc6008 100755 --- a/build/scripts/darwin_arm64.sh +++ b/build/scripts/darwin_arm64.sh @@ -1,5 +1,18 @@ #!/bin/bash +# Copyright 2022 Google LLC. +# 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 +# +# https://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. + set -eu # Create a folder to hold the binaries diff --git a/build/scripts/linux_amd64.sh b/build/scripts/linux_amd64.sh index c6045e6..36bcb67 100755 --- a/build/scripts/linux_amd64.sh +++ b/build/scripts/linux_amd64.sh @@ -1,5 +1,18 @@ #!/bin/bash +# Copyright 2022 Google LLC. +# 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 +# +# https://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. + # Create a folder to hold the binaries rm -rf ./build/bin/linux_amd64 mkdir -p ./build/bin/linux_amd64 diff --git a/build/scripts/windows_amd64.ps1 b/build/scripts/windows_amd64.ps1 index 6b7bc99..d259535 100644 --- a/build/scripts/windows_amd64.ps1 +++ b/build/scripts/windows_amd64.ps1 @@ -1,3 +1,16 @@ +# Copyright 2022 Google LLC. +# 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 +# +# https://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. + $OutputFolder = ".\build\bin\windows_amd64" If (Test-Path $OutputFolder) { # Remove existing binaries diff --git a/client/client.go b/client/client.go index aecaff5..80b3d2b 100644 --- a/client/client.go +++ b/client/client.go @@ -1,6 +1,15 @@ // Copyright 2022 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// 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 +// +// https://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 client is a cross-platform client for the signer binary (a.k.a."EnterpriseCertSigner"). // diff --git a/client/client_test.go b/client/client_test.go index e7ba654..cbb7126 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -1,7 +1,16 @@ // Copyright 2022 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// 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 // +// https://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. + // The tests in this file launches a mock signer binary "signer.go". package client diff --git a/client/testdata/signer.sh b/client/testdata/signer.sh index a12abe5..959ecf2 100755 --- a/client/testdata/signer.sh +++ b/client/testdata/signer.sh @@ -1,7 +1,16 @@ #!/bin/bash # Copyright 2022 Google LLC. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. +# 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 +# +# https://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. go run ../internal/signer/test/signer.go testdata/testcert.pem
\ No newline at end of file diff --git a/client/util/util.go b/client/util/util.go index ccef527..0226a6a 100644 --- a/client/util/util.go +++ b/client/util/util.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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 util provides helper functions for the client. package util diff --git a/client/util/util_test.go b/client/util/util_test.go index ad46592..2066fcd 100644 --- a/client/util/util_test.go +++ b/client/util/util_test.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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 util import ( diff --git a/cshared/main.go b/cshared/main.go index d0e7f2b..db41a93 100644 --- a/cshared/main.go +++ b/cshared/main.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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. + // This package is intended to be compiled into a C shared library for // use by non-Golang clients to perform certificate and signing operations. // diff --git a/internal/signer/darwin/keychain/keychain.go b/internal/signer/darwin/keychain/keychain.go index fa798d9..6759904 100644 --- a/internal/signer/darwin/keychain/keychain.go +++ b/internal/signer/darwin/keychain/keychain.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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. + //go:build darwin && cgo // +build darwin,cgo diff --git a/internal/signer/darwin/keychain/keychain_test.go b/internal/signer/darwin/keychain/keychain_test.go index f6918a7..f58ac53 100644 --- a/internal/signer/darwin/keychain/keychain_test.go +++ b/internal/signer/darwin/keychain/keychain_test.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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. + //go:build darwin && cgo // +build darwin,cgo diff --git a/internal/signer/darwin/signer.go b/internal/signer/darwin/signer.go index b30bae7..f5b89a7 100644 --- a/internal/signer/darwin/signer.go +++ b/internal/signer/darwin/signer.go @@ -1,7 +1,16 @@ // Copyright 2022 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// 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 // +// https://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. + // Signer.go is a net/rpc server that listens on stdin/stdout, exposing // methods that perform device certificate signing for Mac OS using keychain utils. // This server is intended to be launched as a subprocess by the signer client, diff --git a/internal/signer/darwin/util/util.go b/internal/signer/darwin/util/util.go index ed39050..4f238a9 100644 --- a/internal/signer/darwin/util/util.go +++ b/internal/signer/darwin/util/util.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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 util provides helper functions for the signer. package util diff --git a/internal/signer/darwin/util/util_test.go b/internal/signer/darwin/util/util_test.go index 622a179..372ef7e 100644 --- a/internal/signer/darwin/util/util_test.go +++ b/internal/signer/darwin/util/util_test.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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 util import ( diff --git a/internal/signer/linux/signer.go b/internal/signer/linux/signer.go index d032523..c48d989 100644 --- a/internal/signer/linux/signer.go +++ b/internal/signer/linux/signer.go @@ -1,7 +1,16 @@ // Copyright 2022 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// 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 // +// https://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. + // Signer.go is a net/rpc server that listens on stdin/stdout, exposing // methods that perform device certificate signing for Linux using PKCS11 // shared library. diff --git a/internal/signer/linux/util/cert_util.go b/internal/signer/linux/util/cert_util.go index ccf540d..07a1449 100644 --- a/internal/signer/linux/util/cert_util.go +++ b/internal/signer/linux/util/cert_util.go @@ -1,5 +1,17 @@ -// Cert_util provides helpers for working with certificates via PKCS11 +// Copyright 2022 Google LLC. +// 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 +// +// https://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. +// Cert_util provides helpers for working with certificates via PKCS11 package util import ( diff --git a/internal/signer/linux/util/util.go b/internal/signer/linux/util/util.go index 25fcf12..521fa0b 100644 --- a/internal/signer/linux/util/util.go +++ b/internal/signer/linux/util/util.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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 util provides helper functions for the signer. package util @@ -31,10 +44,10 @@ type CertConfigs struct { // PKCS11 contains parameters describing the certificate to use. type PKCS11 struct { - Slot string `json:"slot"` // The hexadecimal representation of the uint36 slot ID. (ex:0x1739427) - Label string `json:"label"` // The token label (ex: gecc) - PKCS11Module string `json:"module"` // The path to the pkcs11 module (shared lib) - UserPin string `json:"user_pin"` // Optional user pin to unlock the PKCS #11 module. If it is not defined or empty C_Login will not be called. + Slot string `json:"slot"` // The hexadecimal representation of the uint36 slot ID. (ex:0x1739427) + Label string `json:"label"` // The token label (ex: gecc) + PKCS11Module string `json:"module"` // The path to the pkcs11 module (shared lib) + UserPin string `json:"user_pin"` // Optional user pin to unlock the PKCS #11 module. If it is not defined or empty C_Login will not be called. } // LoadConfig retrieves the ECP config file. diff --git a/internal/signer/linux/util/util_test.go b/internal/signer/linux/util/util_test.go index a07a80a..86f2b64 100644 --- a/internal/signer/linux/util/util_test.go +++ b/internal/signer/linux/util/util_test.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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 util import ( diff --git a/internal/signer/test/signer.go b/internal/signer/test/signer.go index f96218b..0ef0710 100644 --- a/internal/signer/test/signer.go +++ b/internal/signer/test/signer.go @@ -1,7 +1,16 @@ // Copyright 2022 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// 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 // +// https://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. + // signer.go is a net/rpc server that listens on stdin/stdout, exposing // mock methods for testing client.go. package main diff --git a/internal/signer/windows/ncrypt/cert_util.go b/internal/signer/windows/ncrypt/cert_util.go index 27358e8..bc75164 100644 --- a/internal/signer/windows/ncrypt/cert_util.go +++ b/internal/signer/windows/ncrypt/cert_util.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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. + //go:build windows // +build windows diff --git a/internal/signer/windows/ncrypt/cert_util_test.go b/internal/signer/windows/ncrypt/cert_util_test.go index 4d4ca3c..96ef40a 100644 --- a/internal/signer/windows/ncrypt/cert_util_test.go +++ b/internal/signer/windows/ncrypt/cert_util_test.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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. + //go:build windows // +build windows diff --git a/internal/signer/windows/ncrypt/ncrypt.go b/internal/signer/windows/ncrypt/ncrypt.go index 5719f24..e8997d2 100644 --- a/internal/signer/windows/ncrypt/ncrypt.go +++ b/internal/signer/windows/ncrypt/ncrypt.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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. + //go:build windows // +build windows diff --git a/internal/signer/windows/signer.go b/internal/signer/windows/signer.go index 3244047..5bc6cb4 100644 --- a/internal/signer/windows/signer.go +++ b/internal/signer/windows/signer.go @@ -1,7 +1,16 @@ // Copyright 2022 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// 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 // +// https://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. + // Signer.go is a net/rpc server that listens on stdin/stdout, exposing // methods that perform device certificate signing for Windows OS using ncrypt utils. // This server is intended to be launched as a subprocess by the signer client, diff --git a/internal/signer/windows/util/util.go b/internal/signer/windows/util/util.go index 0da7bc7..a93fc7e 100644 --- a/internal/signer/windows/util/util.go +++ b/internal/signer/windows/util/util.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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 util provides helper functions for the signer. package util diff --git a/internal/signer/windows/util/util_test.go b/internal/signer/windows/util/util_test.go index 97b0e42..89ad6e6 100644 --- a/internal/signer/windows/util/util_test.go +++ b/internal/signer/windows/util/util_test.go @@ -1,3 +1,16 @@ +// Copyright 2022 Google LLC. +// 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 +// +// https://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 util import ( |