我有一个file.txt
,一个cert.pem
和一个file.sign
。
将公钥从cert.pem
提取到pubkey.pem
后,我使用以下命令验证file.sign
并查看它是否与file.txt
匹配:
x590 -pubkey -noout -in cert.pem -out pubkey.pem // Extract pubkey
dgst -sha256 -verify pubkey.pem -signature file.sign file.txt // Verify signature
我有错误:
Verification failure
error in dgst
如果签名与数据file.txt
不匹配,则不会打印error in dgst
吗?我在这里错过了什么吗?
答案 0 :(得分:0)
至少在OpenSSL 1.0.1e-fips版本中,' -pubkey' & openssl x509'选项命令输出stdout的键。它不会被写入' -out'所指示的文件。论点。 尝试:
var width = 960,
height = 1160;
// SVG element as a JavaScript object that we can manipulate later
var svg = d3.select("#map").append("svg")
.attr("width", width)
.attr("height", height);
var center = [24.679341, 46.680381];
// Instantiate the projection object
var projection = d3.geo.conicConformal()
.center(center)
.clipAngle(180)
// Size of the map itself, you may want to play around with this in
// relation to your canvas size
.scale(10000)
// Center the map in the middle of the canvas
.translate([width / 2, height / 2])
.precision(.1);
// Assign the projection to a path
var path = d3.geo.path().projection(projection);
d3.json("https://code.highcharts.com/mapdata/countries/sa/sa-all.geo.json", function(err, data) {
$.each(data.features, function(i, feature) {
svg.append("path")
.datum(feature.geometry)
.attr("class", "border")
.attr("stroke", "black")
.attr("fill", "blue");
});
});