@@ -28,26 +28,6 @@ module.exports.checkCertificate = checkCertificate
28
28
module . exports . checkPkcs12 = checkPkcs12
29
29
module . exports . config = config
30
30
31
- // promisify not tested yet
32
- const promisifyObj = {
33
- createPrivateKey : promisify ( createPrivateKey ) ,
34
- createDhparam : promisify ( createDhparam ) ,
35
- createEcparam : promisify ( createEcparam ) ,
36
- createCSR : promisify ( createCSR ) ,
37
- createCertificate : promisify ( createCertificate ) ,
38
- readCertificateInfo : promisify ( readCertificateInfo ) ,
39
- getPublicKey : promisify ( getPublicKey ) ,
40
- getFingerprint : promisify ( getFingerprint ) ,
41
- getModulus : promisify ( getModulus ) ,
42
- getDhparamInfo : promisify ( getDhparamInfo ) ,
43
- createPkcs12 : promisify ( createPkcs12 ) ,
44
- readPkcs12 : promisify ( readPkcs12 ) ,
45
- verifySigningChain : promisify ( verifySigningChain ) ,
46
- checkCertificate : promisify ( checkCertificate ) ,
47
- checkPkcs12 : promisify ( checkPkcs12 )
48
- }
49
- module . exports . promisified = promisifyObj
50
-
51
31
/**
52
32
* quick access the convert module
53
33
* @type {module:convert }
@@ -237,7 +217,6 @@ function createCSR (options, callback) {
237
217
}
238
218
239
219
var params = [ 'req' ,
240
- '-utf8' ,
241
220
'-new' ,
242
221
'-' + ( options . hash || 'sha256' )
243
222
]
@@ -471,7 +450,6 @@ function getPublicKey (certificate, callback) {
471
450
472
451
if ( certificate . match ( / B E G I N ( \s N E W ) ? C E R T I F I C A T E R E Q U E S T / ) ) {
473
452
params = [ 'req' ,
474
- '-utf8' ,
475
453
'-in' ,
476
454
'--TMPFILE--' ,
477
455
'-pubkey' ,
@@ -485,7 +463,6 @@ function getPublicKey (certificate, callback) {
485
463
]
486
464
} else {
487
465
params = [ 'x509' ,
488
- '-utf8' ,
489
466
'-in' ,
490
467
'--TMPFILE--' ,
491
468
'-pubkey' ,
@@ -1280,3 +1257,32 @@ function readFromString (string, start, end) {
1280
1257
1281
1258
return output
1282
1259
}
1260
+
1261
+ // promisify not tested yet
1262
+ /**
1263
+ * Verifies the signing chain of the passed certificate
1264
+ * @namespace
1265
+ * @name promisified
1266
+ * @property {function } createPrivateKey @see createPrivateKey
1267
+ * @property {function } createDhparam - The default number of players.
1268
+ * @property {function } createEcparam - The default level for the party.
1269
+ * @property {function } createCSR - The default treasure.
1270
+ * @property {function } createCertificate - How much gold the party starts with.
1271
+ */
1272
+ module . exports . promisified = {
1273
+ createPrivateKey : promisify ( createPrivateKey ) ,
1274
+ createDhparam : promisify ( createDhparam ) ,
1275
+ createEcparam : promisify ( createEcparam ) ,
1276
+ createCSR : promisify ( createCSR ) ,
1277
+ createCertificate : promisify ( createCertificate ) ,
1278
+ readCertificateInfo : promisify ( readCertificateInfo ) ,
1279
+ getPublicKey : promisify ( getPublicKey ) ,
1280
+ getFingerprint : promisify ( getFingerprint ) ,
1281
+ getModulus : promisify ( getModulus ) ,
1282
+ getDhparamInfo : promisify ( getDhparamInfo ) ,
1283
+ createPkcs12 : promisify ( createPkcs12 ) ,
1284
+ readPkcs12 : promisify ( readPkcs12 ) ,
1285
+ verifySigningChain : promisify ( verifySigningChain ) ,
1286
+ checkCertificate : promisify ( checkCertificate ) ,
1287
+ checkPkcs12 : promisify ( checkPkcs12 )
1288
+ }
0 commit comments