Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vereign Client Library
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Code
Vereign Client Library
Commits
88d9be6d
Commit
88d9be6d
authored
5 years ago
by
Damyan Mitev
Browse files
Options
Downloads
Patches
Plain Diff
Fix pkijs.RelativeDistinguishedNames.toSchema()
parent
270354e3
No related branches found
Branches containing commit
Tags
1.6
1.7
Tags containing commit
1 merge request
!57
Ssj 1 signing service java initial
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
javascript/src/utilities/signingUtilities.js
+23
-0
23 additions, 0 deletions
javascript/src/utilities/signingUtilities.js
with
23 additions
and
0 deletions
javascript/src/utilities/signingUtilities.js
+
23
−
0
View file @
88d9be6d
...
...
@@ -124,8 +124,28 @@ function generateKeys(algorithms) {
return
crypto
.
generateKey
(
algorithm
.
algorithm
,
true
,
algorithm
.
usages
);
}
function
fixPkijsRDN
()
{
pkijs
.
RelativeDistinguishedNames
.
prototype
.
toSchema
=
function
()
{
//region Decode stored TBS value
if
(
this
.
valueBeforeDecode
.
byteLength
===
0
)
// No stored encoded array, create "from scratch"
{
return
(
new
asn1js
.
Sequence
({
value
:
Array
.
from
(
this
.
typesAndValues
,
element
=>
new
asn1js
.
Set
({
value
:
[
element
.
toSchema
()]}))
}));
}
const
asn1
=
asn1js
.
fromBER
(
this
.
valueBeforeDecode
);
//endregion
//region Construct and return new ASN.1 schema for this object
return
asn1
.
result
;
//endregion
};
}
//*********************************************************************************
function
createCertificate
(
certData
,
issuerData
=
null
)
{
if
(
typeof
certData
===
"
undefined
"
)
{
return
Promise
.
reject
(
"
No Certificate data provided
"
);
}
...
...
@@ -1252,3 +1272,6 @@ export const verifySMIME = (smimeString, rootCaPem) => {
},
50
);
});
};
//Initialization block
fixPkijsRDN
();
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment