-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'dfe1f9181c37607191f394c67b922fde7a5531dd' into HEAD
- Loading branch information
Showing
18 changed files
with
301 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
coverage/ | ||
devdoc/ | ||
test/ | ||
samples/ | ||
src/ | ||
lib/**/*.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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 { TpmSecurityClient } from './lib/tpm'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
'use strict'; | ||
|
||
module.exports = { | ||
TpmSecurityClient : require('lib/tpm').TpmSecurityClient | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "azure-iot-security-tpm", | ||
"version": "0.0.1", | ||
"description": "Azure IoT TPM security client", | ||
"author": "Microsoft Corporation", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"typings": "index.d.ts", | ||
"dependencies": { | ||
"azure-iot-common": "1.2.2", | ||
"debug": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"istanbul": "^0.4.4", | ||
"jshint": "^2.9.2", | ||
"mocha": "^3.0.1", | ||
"sinon": "^1.17.5", | ||
"tslint": "^5.1.0", | ||
"typescript": "2.2.2", | ||
"@types/node": "^7.0.5" | ||
}, | ||
"scripts": { | ||
"lint": "tslint --project . -c ../../tslint.json", | ||
"build": "tsc", | ||
"unittest-min": "istanbul cover --report none node_modules/mocha/bin/_mocha -- --reporter dot test/_*_test.js", | ||
"alltest-min": "istanbul cover --report none node_modules/mocha/bin/_mocha -- --reporter dot test/_*_test*.js", | ||
"unittest": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter spec test/_*_test.js", | ||
"alltest": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter spec test/_*_test*.js", | ||
"ci": "npm -s run lint && npm -s run build && npm -s run alltest-min && npm -s run check-cover", | ||
"test": "npm -s run lint && npm -s run build && npm -s run unittest", | ||
"check-cover": "istanbul check-coverage --statements 50 --branches 50 --lines 50 --functions 50" | ||
}, | ||
"engines": { | ||
"node": ">= 0.10" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Azure/azure-iot-sdk-node.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Azure/azure-iot-sdk-node/issues" | ||
}, | ||
"homepage": "https://github.com/Azure/azure-iot-sdk-node#readme" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#azure-iot-security-tpm | ||
Security module for Azure IoT TPM security | ||
|
||
[![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-tpm@latest` to get the latest (pre-release) version. | ||
|
||
## Getting Started | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
'use strict'; | ||
import { errors } from 'azure-iot-common'; | ||
|
||
export class TpmSecurityClient { | ||
getEndorsementKey(callback: (err?: Error) => void): void { | ||
throw new errors.NotImplementedError(); | ||
} | ||
|
||
getStorageRootKey(callback: (err?: Error) => void): void { | ||
throw new errors.NotImplementedError(); | ||
} | ||
|
||
signWithIdentity(callback: (err?: Error) => void): void { | ||
throw new errors.NotImplementedError(); | ||
} | ||
|
||
activateSymmetricIdentity(callback: (err?: Error) => void): void { | ||
throw new errors.NotImplementedError(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
'use strict'; | ||
|
||
var TpmSecurityClient = require('../lib/tpm').TpmSecurityClient ; | ||
var assert = require('chai').assert; | ||
|
||
describe('tpm', function () { | ||
this.timeout(1000); | ||
|
||
var obj = new TpmSecurityClient (); | ||
|
||
describe('getEndorsementKey', function() { | ||
it ('throws', function() { | ||
assert.throws(function() { | ||
obj.getEndorsementKey(); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('getStorageRootKey', function() { | ||
it ('throws', function() { | ||
assert.throws(function() { | ||
obj.getStorageRootKey(); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('signWithIdentity', function() { | ||
it ('throws', function() { | ||
assert.throws(function() { | ||
obj.signWithIdentity(); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('activateSymmetricIdentity', function() { | ||
it ('throws', function() { | ||
assert.throws(function() { | ||
obj.activateSymmetricIdentity(); | ||
}); | ||
}); | ||
}); | ||
|
||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "./lib", | ||
"target":"es5", | ||
"sourceMap": true, | ||
"declaration": true | ||
}, | ||
"include": [ | ||
"./src/**/*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
coverage/ | ||
devdoc/ | ||
test/ | ||
samples/ | ||
src/ | ||
lib/**/*.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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 { X509SecurityClient } from './lib/x509'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
'use strict'; | ||
|
||
module.exports = { | ||
X509SecurityClient: require('lib/x509').X509SecurityClient | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "azure-iot-security-x509", | ||
"version": "0.0.1", | ||
"description": "Azure IoT x509 security client", | ||
"author": "Microsoft Corporation", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"typings": "index.d.ts", | ||
"dependencies": { | ||
"azure-iot-common": "1.2.2", | ||
"debug": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"istanbul": "^0.4.4", | ||
"jshint": "^2.9.2", | ||
"mocha": "^3.0.1", | ||
"sinon": "^1.17.5", | ||
"tslint": "^5.1.0", | ||
"typescript": "2.2.2", | ||
"@types/node": "^7.0.5" | ||
}, | ||
"scripts": { | ||
"lint": "tslint --project . -c ../../tslint.json", | ||
"build": "tsc", | ||
"unittest-min": "istanbul cover --report none node_modules/mocha/bin/_mocha -- --reporter dot test/_*_test.js", | ||
"alltest-min": "istanbul cover --report none node_modules/mocha/bin/_mocha -- --reporter dot test/_*_test*.js", | ||
"unittest": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter spec test/_*_test.js", | ||
"alltest": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter spec test/_*_test*.js", | ||
"ci": "npm -s run lint && npm -s run build && npm -s run alltest-min && npm -s run check-cover", | ||
"test": "npm -s run lint && npm -s run build && npm -s run unittest", | ||
"check-cover": "istanbul check-coverage --statements 50 --branches 50 --lines 50 --functions 50" | ||
}, | ||
"engines": { | ||
"node": ">= 0.10" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Azure/azure-iot-sdk-node.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Azure/azure-iot-sdk-node/issues" | ||
}, | ||
"homepage": "https://github.com/Azure/azure-iot-sdk-node#readme" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#azure-iot-security-x509 | ||
Security module for Azure IoT x509 security | ||
|
||
[![npm version](https://badge.fury.io/js/azure-iot-security-x509.svg)](https://badge.fury.io/js/azure-iot-security-x509) | ||
|
||
## Install | ||
|
||
`npm install -g azure-iot-security-x509@latest` to get the latest (pre-release) version. | ||
|
||
## Getting Started | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
'use strict'; | ||
import { errors } from 'azure-iot-common'; | ||
|
||
export class X509SecurityClient { | ||
getCertificate(callback: (err?: Error, cert?: string) => void): void { | ||
throw new errors.NotImplementedError(); | ||
} | ||
|
||
getCertificateChain(callback: (err?: Error, cert?: string) => void): void { | ||
throw new errors.NotImplementedError(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
'use strict'; | ||
|
||
var X509SecurityClient = require('../lib/x509').X509SecurityClient; | ||
var assert = require('chai').assert; | ||
|
||
describe('x509', function () { | ||
this.timeout(1000); | ||
|
||
var obj = new X509SecurityClient(); | ||
|
||
describe('getCertificate', function() { | ||
it ('throws', function() { | ||
assert.throws(function() { | ||
obj.getCertificate(); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('getCertificateChain', function() { | ||
it ('throws', function() { | ||
assert.throws(function() { | ||
obj.getCertificateChain(); | ||
}); | ||
}); | ||
}); | ||
|
||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "./lib", | ||
"target":"es5", | ||
"sourceMap": true, | ||
"declaration": true | ||
}, | ||
"include": [ | ||
"./src/**/*.ts" | ||
] | ||
} |