You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ When verifying a xml document you can pass the following options to the `SignedX
116
116
-`publicCert` - **[optional]** your certificate as a string, a string of multiple certs in PEM format, or a Buffer
117
117
-`privateKey` - **[optional]** your private key as a string or a Buffer - used for verifying symmetrical signatures (HMAC)
118
118
119
-
The certificate that will be used to check the signature will first be determined by calling `.getCertFromKeyInfo()`, which function you can customize as you see fit. If that returns `null`, then `publicCert` is used. If that is `null`, then `privateKey` is used (for symmetrical signing applications). If you do not want to trust any embedded `<KeyInfo />` node, preferring to validate the signature using a provided `publicCert`, you can set `getCertFromKeyInfo` to return `null`.
119
+
The certificate that will be used to check the signature will first be determined by calling `this.getCertFromKeyInfo()`, which function you can customize as you see fit. If that returns `null`, then `publicCert` is used. If that is `null`, then `privateKey` is used (for symmetrical signing applications).
120
120
121
121
Example:
122
122
@@ -246,7 +246,7 @@ The `SignedXml` constructor provides an abstraction for sign and verify xml docu
246
246
-`inclusiveNamespacesPrefixList` - string - default `null` - a list of namespace prefixes to include during canonicalization
247
247
-`implicitTransforms` - string[] - default `[]` - a list of implicit transforms to use during verification
248
248
-`keyInfoAttributes` - object - default `{}` - a hash of attributes and values `attrName: value` to add to the KeyInfo node
249
-
-`getKeyInfoContent` - function - default `SignedXml.geTKeyInfoContent` - a function that returns the content of the KeyInfo node
249
+
-`getKeyInfoContent` - function - default `noop` - a function that returns the content of the KeyInfo node
250
250
-`getCertFromKeyInfo` - function - default `SignedXml.getCertFromKeyInfo` - a function that returns the certificate from the `<KeyInfo />` node
251
251
252
252
#### API
@@ -290,8 +290,8 @@ var SignedXml = require("xml-crypto").SignedXml,
290
290
Now define the extension point you want to implement. You can choose one or more.
291
291
292
292
To determine the inclusion and contents of a `<KeyInfo />` element, the function
293
-
`getKeyInfoContent()` is called. There is a default implementation of this. If you wish to change
294
-
this implementation, provide your own function assigned to the property `.getKeyInfoContent`. If
293
+
`this.getKeyInfoContent()` is called. There is a default implementation of this. If you wish to change
294
+
this implementation, provide your own function assigned to the property `this.getKeyInfoContent`. If you prefer to use the default implementation, assign `SignedXml.getKeyInfoContent` to `this.getKeyInfoContent` If
295
295
there are no attributes and no contents to the `<KeyInfo />` element, it won't be included in the
0 commit comments