Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions packages/comms/src/ecl/logicalFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export class LogicalFile extends StateObject<FileDetailEx, FileDetailEx> impleme
get StateID(): number { return this.get("StateID"); }
get ExpirationDate(): string { return this.get("ExpirationDate"); }
get ExtendedIndexInfo(): WsDfu.ExtendedIndexInfo { return this.get("ExtendedIndexInfo"); }
get CompressionType(): string { return this.get("CompressionType"); }

get properties(): FileDetailEx { return this.get(); }

Expand Down
2 changes: 1 addition & 1 deletion packages/comms/src/ecl/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class Store {
private _knownValues: { [key: string]: any } = {};

protected create() {
this.connection.CreateStore({ Name: this.Name, UserSpecific: this.UserSpecific, Type: "", Description: "" });
this.connection.CreateStore({ Name: this.Name, Type: "", Description: "" });
}

set(key: string, value: string, broadcast = true): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion packages/comms/src/services/fileSpray.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FileSprayServiceBase, FileSpray } from "./wsdl/FileSpray/v1.26/FileSpray.ts";
import { FileSprayServiceBase, FileSpray } from "./wsdl/FileSpray/v1.27/FileSpray.ts";

export {
FileSpray
Expand Down
90 changes: 7 additions & 83 deletions packages/comms/src/services/wsCodesign.ts
Original file line number Diff line number Diff line change
@@ -1,94 +1,18 @@
import { IConnection, IOptions } from "../connection.ts";
import { ESPConnection } from "../espConnection.ts";
import { CodesignServiceBase, WsCodesign } from "./wsdl/ws_codesign/v1.1/ws_codesign.ts";

/*
Response structures generated via:
* http://localhost:8010/ws_codesign/?ver_=1.1&respjson_
* http://json2ts.com/
*/
export namespace WsCodesign {
export { WsCodesign };

export interface ListUserIDsRequest {
}

export interface WsCodesignPingRequest {
}

export interface SignRequest {
SigningMethod?: string;
UserID: string;
KeyPass: string;
Text: string;
}

export interface VerifyRequest {
Text: string;
}

export interface Exception {
Code: string;
Audience: string;
Source: string;
Message: string;
}

export interface Exceptions {
Source: string;
Exception: Exception[];
}

export interface UserIDs {
Item: string[];
}

export interface ListUserIDsResponse {
Exceptions: Exceptions;
UserIDs: UserIDs;
}
export class CodesignService extends CodesignServiceBase {

export interface WsCodesignPingResponse {
}

export interface SignResponse {
Exceptions: Exceptions;
RetCode: number;
ErrMsg: string;
SignedText: string;
}

export interface VerifyResponse {
Exceptions: Exceptions;
RetCode: number;
ErrMsg: string;
IsVerified: boolean;
SignedBy: string;
}
}

export class CodesignService {
private _connection: ESPConnection;

constructor(optsConnection: IOptions | IConnection) {
this._connection = new ESPConnection(optsConnection, "ws_codesign", "1.1");
}

connectionOptions(): IOptions {
return this._connection.opts();
}

ListUserIDs(request: WsCodesign.ListUserIDsRequest): Promise<string[]> {
return this._connection.send("ListUserIDs", request).then((response: WsCodesign.ListUserIDsResponse) => {
ListUserIDsEx(request: Partial<WsCodesign.ListUserIDsRequest>): Promise<string[]> {
return super.ListUserIDs(request).then((response: WsCodesign.ListUserIDsResponse) => {
return response.UserIDs.Item;
}).catch(e => {
return [];
});
}

Sign(request: WsCodesign.SignRequest): Promise<WsCodesign.SignResponse> {
return this._connection.send("Sign", { SigningMethod: "gpg", ...request });
}

Verify(request: WsCodesign.VerifyRequest): Promise<WsCodesign.VerifyResponse> {
return this._connection.send("Verify", request);
Sign(request: Partial<WsCodesign.SignRequest>): Promise<WsCodesign.SignResponse> {
return super.Sign({ SigningMethod: WsCodesign.SigningMethodType.gpg, ...request });
}
}
2 changes: 1 addition & 1 deletion packages/comms/src/services/wsDFU.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DfuServiceBase, WsDfu } from "./wsdl/WsDfu/v1.65/WsDfu.ts";
import { DfuServiceBase, WsDfu } from "./wsdl/WsDfu/v1.67/WsDfu.ts";

export { WsDfu };

Expand Down
Loading