Skip to content

Commit

Permalink
use instance specific key name
Browse files Browse the repository at this point in the history
  • Loading branch information
seattlevine committed Sep 14, 2017
1 parent 203f83b commit e64aa5a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Binary file modified dist/f5-cloud-libs.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/verifyHash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cli script /Common/verifyHash {
proc script::run {} {
if {[catch {
set hashes(f5-cloud-libs.tar.gz) 5303cf66322f8a03f81c9dd3f3f938ce460945bf10c4b2148941b37be3bc71c7bf062a74721078cfd7a2bfa6934cb3b28a5f7b3e062c295ec35a74163f252075
set hashes(f5-cloud-libs.tar.gz) 4350f7d53db6816b8f89a54f15ad6de241553b97fd176b1df6a849df95091a815d6900e3af0353c5191dee2e80dc87c89be9dfdb2d0bfac61b179402c3ed94ce
set hashes(f5-cloud-libs-aws.tar.gz) 549aa436be806c80640f8dce570128fdf84613bf0688392e018639412c63818d25f26635b0aaf23e8cdf60b0d331de9218ed51a9cdfbf33db6e683727169a727
set hashes(f5-cloud-libs-azure.tar.gz) a4ff4a9af058ce6058159531fd7bca07eb8808cdd1b1e13de0e1324ec7e4692211991ecaa58dc36021c6c88c7783837d480584393753c3dfc2fddf623781e3a9
set hashes(asm-policy-linux.tar.gz) 63b5c2a51ca09c43bd89af3773bbab87c71a6e7f6ad9410b229b4e0a1c483d46f1a9fff39d9944041b02ee9260724027414de592e99f4c2475415323e18a72e0
Expand Down
11 changes: 8 additions & 3 deletions scripts/autoscale.js
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,8 @@ logger.silly('ENCRYPTED DATA:', encryptedData);
return provider.putPublicKey(publicKey, this.instanceId);
}.bind(this))
.then(function() {
return bigIp.installCloudPrivateKey(privateKeyOutFile, CLOUD_LIBS_PRIVATE_KEY_PREFIX + this.instanceId);
});
return bigIp.installCloudPrivateKey(privateKeyOutFile, getPrivateKeyName.call(this));
}.bind(this));
}
else {
return q();
Expand Down Expand Up @@ -1119,12 +1119,13 @@ logger.info('DECRYPTING MESSAGE:', messageData);

if (!this.cloudPrivateKeyPath) {
logger.silly('getting private key path');
filePromise = bigIp.getCloudPrivateKeyFilePath(CLOUD_LIBS_PRIVATE_KEY_PREFIX + this.instanceId);
filePromise = bigIp.getCloudPrivateKeyFilePath(getPrivateKeyName.call(this));
}
else {
logger.silly('using cached key');
filePromise = q(this.cloudPrivateKeyPath);
}

return filePromise
.then(function(cloudPrivateKeyPath) {
// TODO: remove this
Expand All @@ -1136,6 +1137,10 @@ logger.silly('PRIVATE KEY:', foo.toString());
}.bind(this));
};

var getPrivateKeyName = function() {
return CLOUD_LIBS_PRIVATE_KEY_PREFIX + this.instanceId;
};

// If we're called from the command line, run
// This allows for test code to call us as a module
if (!module.parent) {
Expand Down

0 comments on commit e64aa5a

Please sign in to comment.