mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
528 B
22 lines
528 B
'use strict';
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
if (!common.hasFipsCrypto) {
|
|
console.log('1..0 # Skipped: node compiled without FIPS OpenSSL.');
|
|
return;
|
|
}
|
|
|
|
var crypto = require('crypto');
|
|
var fs = require('fs');
|
|
|
|
var input = 'hello';
|
|
|
|
var dsapri = fs.readFileSync(common.fixturesDir +
|
|
'/keys/dsa_private_1025.pem');
|
|
var sign = crypto.createSign('DSS1');
|
|
sign.update(input);
|
|
|
|
assert.throws(function() {
|
|
sign.sign(dsapri);
|
|
}, /PEM_read_bio_PrivateKey failed/);
|
|
|