certificate provider
Summary: _typescript_ Reviewed By: passy Differential Revision: D17096517 fbshipit-source-id: a6e69e8b9a82fe76bb1de51a3a93182f35f40b3f
This commit is contained in:
committed by
Facebook Github Bot
parent
9970c50daf
commit
5868946818
@@ -5,16 +5,17 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {exec as opensslWithCallback} from 'openssl-wrapper';
|
||||
import {exec as opensslWithCallback, Action} from 'openssl-wrapper';
|
||||
import child_process from 'child_process';
|
||||
|
||||
export function openssl(action: string, options: {}): Promise<string> {
|
||||
export function openssl(action: Action, options: {}): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
opensslWithCallback(action, options, (err, buffer) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else if (buffer) {
|
||||
resolve(buffer.toString());
|
||||
}
|
||||
resolve(buffer.toString());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user