ValidateSignature(cswFileNameOrStream) ;
new sc,status,xmlSignature,cswRootCA,reader
;
set cswRootCA="/certfiles/root_ca_icp-brasil.crt"
set reader=##class(%XML.Reader).%New()
;
set sc=reader.OpenFile(cswFileNameOrStream)
quit:$$$ISERR(sc) sc
;
do reader.Correlate("Signature", "%XML.Security.Signature")
while (reader.Next(.xmlSignature, .status) && (sc=$$$OK)) {
set sc = xmlSignature.ValidateDocument(reader.Document,,cswRootCA)
}
;
quit sc
HI all.....
I found a simple solution....