Skip to content

Commit 0163a76

Browse files
FAB-3691 fix misspelled words caught by misspell
note that bddtests/regression/go/ote/ote.go is just whitespace alignment affected by linter. add check_spelling.sh Add check_spelling to Makefile Change-Id: I7029e1223abede0d05758a8b3d435be061824083 Signed-off-by: Christopher Ferris <[email protected]>
1 parent 154160e commit 0163a76

File tree

54 files changed

+1094
-974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1094
-974
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ include docker-env.mk
9595

9696
all: native docker checks
9797

98-
checks: linter license unit-test behave
98+
checks: linter license spelling unit-test behave
99+
100+
spelling: buildenv
101+
@scripts/check_spelling.sh
99102

100103
license: buildenv
101104
@scripts/check_license.sh

bccsp/pkcs11/fileks.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16+
1617
package pkcs11
1718

1819
import (
@@ -31,7 +32,7 @@ import (
3132
"github.com/hyperledger/fabric/bccsp/utils"
3233
)
3334

34-
// fileBasedKeyStore is a folder-based KeyStore.
35+
// FileBasedKeyStore is a folder-based KeyStore.
3536
// Each key is stored in a separated file whose name contains the key's SKI
3637
// and flags to identity the key's type. All the keys are stored in
3738
// a folder whose path is provided at initialization time.

bccsp/pkcs11/impl_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ func TestRSAKeyGenEphemeral(t *testing.T) {
14681468
t.Fatalf("Failed generating RSA corresponding public key [%s]", err)
14691469
}
14701470
if pk == nil {
1471-
t.Fatal("PK must be diffrent from nil")
1471+
t.Fatal("PK must be different from nil")
14721472
}
14731473

14741474
b, err := k.Bytes()

bccsp/sw/impl_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ func TestRSAKeyGenEphemeral(t *testing.T) {
13741374
t.Fatalf("Failed generating RSA corresponding public key [%s]", err)
13751375
}
13761376
if pk == nil {
1377-
t.Fatal("PK must be diffrent from nil")
1377+
t.Fatal("PK must be different from nil")
13781378
}
13791379

13801380
b, err := k.Bytes()

bccsp/utils/keys.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ func DERToPrivateKey(der []byte) (key interface{}, err error) {
208208
// PEMtoPrivateKey unmarshals a pem to private key
209209
func PEMtoPrivateKey(raw []byte, pwd []byte) (interface{}, error) {
210210
if len(raw) == 0 {
211-
return nil, errors.New("Invalid PEM. It must be diffrent from nil.")
211+
return nil, errors.New("Invalid PEM. It must be different from nil.")
212212
}
213213
block, _ := pem.Decode(raw)
214214
if block == nil {
215-
return nil, fmt.Errorf("Failed decoding PEM. Block must be diffrent from nil. [% x]", raw)
215+
return nil, fmt.Errorf("Failed decoding PEM. Block must be different from nil. [% x]", raw)
216216
}
217217

218218
// TODO: derive from header the type of the key
@@ -244,7 +244,7 @@ func PEMtoPrivateKey(raw []byte, pwd []byte) (interface{}, error) {
244244
// PEMtoAES extracts from the PEM an AES key
245245
func PEMtoAES(raw []byte, pwd []byte) ([]byte, error) {
246246
if len(raw) == 0 {
247-
return nil, errors.New("Invalid PEM. It must be diffrent from nil.")
247+
return nil, errors.New("Invalid PEM. It must be different from nil.")
248248
}
249249
block, _ := pem.Decode(raw)
250250
if block == nil {
@@ -404,7 +404,7 @@ func PublicKeyToEncryptedPEM(publicKey interface{}, pwd []byte) ([]byte, error)
404404
// PEMtoPublicKey unmarshals a pem to public key
405405
func PEMtoPublicKey(raw []byte, pwd []byte) (interface{}, error) {
406406
if len(raw) == 0 {
407-
return nil, errors.New("Invalid PEM. It must be diffrent from nil.")
407+
return nil, errors.New("Invalid PEM. It must be different from nil.")
408408
}
409409
block, _ := pem.Decode(raw)
410410
if block == nil {
@@ -439,7 +439,7 @@ func PEMtoPublicKey(raw []byte, pwd []byte) (interface{}, error) {
439439
// DERToPublicKey unmarshals a der to public key
440440
func DERToPublicKey(raw []byte) (pub interface{}, err error) {
441441
if len(raw) == 0 {
442-
return nil, errors.New("Invalid DER. It must be diffrent from nil.")
442+
return nil, errors.New("Invalid DER. It must be different from nil.")
443443
}
444444

445445
key, err := x509.ParsePKIXPublicKey(raw)

bddtests/context_endorser.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ func (b *BDDContext) userExpectsProposalResponsesWithStatusFromEndorsers(enrollI
316316
var userRegistration *UserRegistration
317317
var keyedProposalResponseMap KeyedProposalResponseMap
318318
errRetFunc := func() error {
319-
return fmt.Errorf("Error verifying proposal reponse '%s' for user '%s' with expected response code of '%s': %s", proposalResponseAlias, enrollID, respStatusCode, err)
319+
return fmt.Errorf("Error verifying proposal response '%s' for user '%s' with expected response code of '%s': %s", proposalResponseAlias, enrollID, respStatusCode, err)
320320
}
321321
if userRegistration, err = b.GetUserRegistration(enrollID); err != nil {
322322
return errRetFunc()

0 commit comments

Comments
 (0)