Dart / Redstone - HTTPS 连接

Dart / Redstone - HTTPS Connection

早上好,

我有问题,我想在我的 API 和我的服务器之间建立 HTTPS 连接。 我将 Dart 与 Redstone Dart 层一起使用。 我所有的证书都经过验证。

我用的是RedStone函数的:start();建立这种联系。

但是我在连接过程中出现错误。

INFO: 2016-01-25 02:26:09.789: Using a secure connection with options: {Symbol("certificateName"): CN=RedStone, Symbol("context"): Instance of '_SecurityContext'}

Unhandled exception: Closure call with mismatched arguments: function 'call'

NoSuchMethodError: incorrect number of arguments passed to method named 'call' Receiver: Closure: (dynamic, int, SecurityContext, {backlog: int, v6Only: bool, requestClientCertificate: bool, shared: bool}) => Future from Function 'bindSecure': static. Tried calling: call("0.0.0.0", 9000, certificateName: "CN=RedStone", context: Instance of '_SecurityContext', shared: false) Found: call(address, port, context, backlog, v6Only, requestClientCertificate, shared) »

这是我的代码片段:

SecurityContext serverContext = new SecurityContext()
  ..useCertificateChain(localFile('certificates/server_chain.pem'))
  ..usePrivateKey(localFile('certificates/server_key.pem'),
  password: 'test');
var secureOptions = {#certificateName: "CN=RedStone", #context: serverContext};

app.setupConsoleLog(Level.INFO);

app.start(port:9000, secureOptions: secureOptions);

参数我都设置好了,不明白为什么还是报错

如果有人,可以帮帮我吗?

谢谢

这是目前 Redstone (0.6) 中的一个错误,我会尽快打补丁并发布。感谢您报告此事。