Skip to content

fix certificate storing #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/boardConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default class BoardConfiguration {
const notBefore = new Date(compressedCert.not_before);
const notAfter = new Date(compressedCert.not_after);
// eslint-disable-next-line prefer-template
const answers = board.id + '\n' +
const answers = board.deviceId + '\n' +
notBefore.getUTCFullYear() + '\n' +
(notBefore.getUTCMonth() + 1) + '\n' +
notBefore.getUTCDate() + '\n' +
Expand Down Expand Up @@ -220,7 +220,8 @@ export default class BoardConfiguration {
msg: `Couldn't configure board at port ${board.port}. Configuration failed with error: ${reason.message}`,
err: reason.toString()
}))
.finally(() => this.daemon.closeSerialMonitor(board.port, BAUDRATE));
// We are using a timer because we can't close the serial monitor immediately and we have to wait the sketch to finish.
.finally(() => timer(3000).subscribe(() => this.daemon.closeSerialMonitor(board.port, BAUDRATE)));
}, error => {
this.configuring.next({
status: this.CONFIGURE_ERROR,
Expand Down