Dtls set local certificate

This commit is contained in:
Ludovic Chenut 2023-11-28 16:06:26 +01:00
parent 7d14cdcb48
commit de12f43ef9
No known key found for this signature in database
GPG Key ID: D9A59B1907F1D50C
1 changed files with 1 additions and 2 deletions

View File

@ -196,7 +196,7 @@ proc serverHandshake(self: DtlsConn) {.async.} =
proc remoteCertificate*(conn: DtlsConn): seq[byte] =
conn.remoteCert
proc localCertificate*(self: Dtls): seq[byte] =
proc localCertificate*(self: DtlsConn): seq[byte] =
self.localCert
proc verify(ctx: pointer, pcert: ptr mbedtls_x509_crt,
@ -224,7 +224,6 @@ proc accept*(self: Dtls): Future[DtlsConn] {.async.} =
var pkey = self.serverPrivKey
var srvcert = self.serverCert
res.localCert = newSeq[byte](srvcert.raw.len)
res.localCert = self.localCert
mb_ssl_config_defaults(res.config,