forked from drechema/ensemble-smime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.smime.bp.SignSMIMEProcess.xml
More file actions
executable file
·78 lines (71 loc) · 2.24 KB
/
demo.smime.bp.SignSMIMEProcess.xml
File metadata and controls
executable file
·78 lines (71 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2015.2.1 (Build 705U)" ts="2016-01-25 12:19:45">
<Class name="demo.smime.bp.SignSMIMEProcess">
<ClassType>persistent</ClassType>
<Super>Ens.BusinessProcess</Super>
<TimeChanged>63904,37725.597763</TimeChanged>
<TimeCreated>63897,83829.032735</TimeCreated>
<Parameter name="SETTINGS">
<Default>certPath,keyPath,TargetConfigName</Default>
</Parameter>
<Property name="certPath">
<Type>%String</Type>
<Parameter name="MAXLEN"/>
</Property>
<Property name="keyPath">
<Type>%String</Type>
<Parameter name="MAXLEN"/>
</Property>
<Property name="TargetConfigName">
<Type>%String</Type>
</Property>
<Method name="OnRequest">
<FormalSpec>pRequest:Ens.StreamContainer,*pResponse:Ens.Response</FormalSpec>
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
set smime = ##class(demo.smime.util.SMIME).%New()
set tSC = smime.sign(..certPath,..keyPath,pRequest.StreamGet(),.outStream)
if $$$ISERR(tSC) quit tSC
set reqSMIME = ##class(Ens.StreamContainer).%New()
set tSC = reqSMIME.StreamSet(outStream)
if $$$ISERR(tSC) quit tSC
if ..TargetConfigName'="" {
set tSC = ..SendRequestAsync(..TargetConfigName,reqSMIME,0)
}
kill smime
Quit tSC
]]></Implementation>
</Method>
<Method name="OnGetConnections">
<Description>
Return an array of connections for drawing lines on the config diagram</Description>
<ClassMethod>1</ClassMethod>
<FormalSpec>*pArray:%String,pItem:Ens.Config.Item</FormalSpec>
<Implementation><![CDATA[
Do ##super(.pArray,pItem)
If pItem.GetModifiedSetting("TargetConfigName",.tValue) {
For i=1:1:$L(tValue,",") { Set tOne=$ZStrip($P(tValue,",",i),"<>W") Continue:""=tOne Set pArray(tOne)="" }
}
]]></Implementation>
</Method>
<Storage name="Default">
<Type>%Library.CacheStorage</Type>
<DefaultData>SignSMIMEProcessDefaultData</DefaultData>
<Data name="SignSMIMEProcessDefaultData">
<Subscript>"SignSMIMEProcess"</Subscript>
<Value name="1">
<Value>certPath</Value>
</Value>
<Value name="2">
<Value>keyPath</Value>
</Value>
<Value name="3">
<Value>target</Value>
</Value>
<Value name="4">
<Value>TargetConfigName</Value>
</Value>
</Data>
</Storage>
</Class>
</Export>