import std.stdio;
import deimos.openssl.bn;
import deimos.openssl.rsa;
const KEY_SIZE = 1024;
void main(string[] args) {
if (args.length < 1) {
writeln("too few arguments");
}
RSA* rsa = RSA_new();
rsa = RSA_generate_key(KEY_SIZE, RSA_F4, null, null);
if(rsa==null) {
writeln("failure");
}
else {
writeln("success");
// error generated by the line below
if(!BN_generate_prime(rsa.p, (KEY_SIZE/2), 1, null, null, null, null)) {
writeln("prime_failure");
}
else {
writeln("prime success");
}
RSA_free(rsa);
}
}
:Dプログラミング:opensslのRSA前方参照コンパイルエラーこれは、次のようなエラーにつながる
rsa.d(21): Error: struct rsa_st is forward referenced
エラーがいつでも発生するが、私は、RSA構造体の要素にアクセスしよう。何か案は?
誰もが任意のアイデアがありますか? – John
あなたのプログラムをコンパイルするためにどのようなコマンドを使用していますか? – Bernard