Skip to content

Commit

Permalink
Code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
BertKleewein committed Nov 14, 2017
1 parent f8fdfbf commit dfe1f91
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion security/tpm/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

export { TMPSecurityObject } from './lib/tpm';
export { TpmSecurityClient } from './lib/tpm';
2 changes: 1 addition & 1 deletion security/tpm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
'use strict';

module.exports = {
TMPSecurityObject: require('lib/tpm').TMPSecurityObject
TpmSecurityClient : require('lib/tpm').TpmSecurityClient
};
4 changes: 2 additions & 2 deletions security/tpm/readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#azure-iot-security-tpm
Security module for Azure IoT TPM security

[![npm version](https://badge.fury.io/js/azure-iot-security-x509.svg)](https://badge.fury.io/js/azure-iot-security-x509)
[![npm version](https://badge.fury.io/js/azure-iot-security-tpm.svg)](https://badge.fury.io/js/azure-iot-security-tpm)

## Install

`npm install -g azure-iot-security-x509@latest` to get the latest (pre-release) version.
`npm install -g azure-iot-security-tpm@latest` to get the latest (pre-release) version.

## Getting Started

Expand Down
10 changes: 5 additions & 5 deletions security/tpm/src/tpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
'use strict';
import { errors } from 'azure-iot-common';

export class TMPSecurityObject {
getEndoresementKey(callback: (err?: Error) => void): void {
export class TpmSecurityClient {
getEndorsementKey(callback: (err?: Error) => void): void {
throw new errors.NotImplementedError();
}

getStorageKey(callback: (err?: Error) => void): void {
getStorageRootKey(callback: (err?: Error) => void): void {
throw new errors.NotImplementedError();
}

signData(callback: (err?: Error) => void): void {
signWithIdentity(callback: (err?: Error) => void): void {
throw new errors.NotImplementedError();
}

activateSymetricIdentity(callback: (err?: Error) => void): void {
activateSymmetricIdentity(callback: (err?: Error) => void): void {
throw new errors.NotImplementedError();
}
}
Expand Down
20 changes: 10 additions & 10 deletions security/tpm/test/_tpm_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,42 @@

'use strict';

var TMPSecurityObject = require('../lib/tpm').TMPSecurityObject;
var TpmSecurityClient = require('../lib/tpm').TpmSecurityClient ;
var assert = require('chai').assert;

describe('tpm', function () {
this.timeout(1000);

var obj = new TMPSecurityObject();
var obj = new TpmSecurityClient ();

describe('getEndoresementKey', function() {
describe('getEndorsementKey', function() {
it ('throws', function() {
assert.throws(function() {
obj.getEndoresementKey();
obj.getEndorsementKey();
});
});
});

describe('getStorageKey', function() {
describe('getStorageRootKey', function() {
it ('throws', function() {
assert.throws(function() {
obj.getStorageKey();
obj.getStorageRootKey();
});
});
});

describe('signData', function() {
describe('signWithIdentity', function() {
it ('throws', function() {
assert.throws(function() {
obj.signData();
obj.signWithIdentity();
});
});
});

describe('activateSymetricIdentity', function() {
describe('activateSymmetricIdentity', function() {
it ('throws', function() {
assert.throws(function() {
obj.activateSymetricIdentity();
obj.activateSymmetricIdentity();
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion security/x509/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

export { X509SecurityObject } from './lib/x509';
export { X509SecurityClient } from './lib/x509';
2 changes: 1 addition & 1 deletion security/x509/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
'use strict';

module.exports = {
X509SecurityObject: require('lib/x509').X509SecurityObject
X509SecurityClient: require('lib/x509').X509SecurityClient
};
2 changes: 1 addition & 1 deletion security/x509/src/x509.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'use strict';
import { errors } from 'azure-iot-common';

export class X509SecurityObject {
export class X509SecurityClient {
getCertificate(callback: (err?: Error, cert?: string) => void): void {
throw new errors.NotImplementedError();
}
Expand Down
8 changes: 4 additions & 4 deletions security/x509/test/_x509_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@

'use strict';

var X509SecurityObject = require('../lib/x509').X509SecurityObject;
var X509SecurityClient = require('../lib/x509').X509SecurityClient;
var assert = require('chai').assert;

describe('x509', function () {
this.timeout(1000);

var obj = new X509SecurityObject();
var obj = new X509SecurityClient();

describe('GetCertificate', function() {
describe('getCertificate', function() {
it ('throws', function() {
assert.throws(function() {
obj.getCertificate();
});
});
});

describe('GetCertificateChain', function() {
describe('getCertificateChain', function() {
it ('throws', function() {
assert.throws(function() {
obj.getCertificateChain();
Expand Down

0 comments on commit dfe1f91

Please sign in to comment.