Skip to content

Commit

Permalink
fix: added copyright
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Aug 2, 2023
1 parent 936ba2b commit 2345740
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 1 deletion.
15 changes: 14 additions & 1 deletion internal/encoding/asn1/asn1.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// Copyright The Notary Project 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 asn1 decodes BER-encoded ASN.1 data structures and encodes in DER.
// Note: DER is a subset of BER.
// Reference: http://luca.ntop.org/Teaching/Appunti/asn1.html
Expand Down Expand Up @@ -72,7 +85,7 @@ func decode(r []byte) (value, error) {
expectedLen: contentLen,
}

// start deep-first decoding with stack
// start depth-first decoding with stack
valueStack := []*constructedValue{&rootConstructed}
for len(valueStack) > 0 {
stackLen := len(valueStack)
Expand Down
13 changes: 13 additions & 0 deletions internal/encoding/asn1/asn1_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// Copyright The Notary Project 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 asn1

import (
Expand Down
13 changes: 13 additions & 0 deletions internal/encoding/asn1/common.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// Copyright The Notary Project 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 asn1

import (
Expand Down
13 changes: 13 additions & 0 deletions internal/encoding/asn1/constructed.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ package asn1

import "bytes"

// Copyright The Notary Project 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.

// constructedValue represents a value in constructed encoding.
type constructedValue struct {
identifier []byte
Expand Down
13 changes: 13 additions & 0 deletions internal/encoding/asn1/primitive.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// Copyright The Notary Project 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 asn1

import "bytes"
Expand Down

0 comments on commit 2345740

Please sign in to comment.