blob: e77236b27da85cf0fb944191b274dfcec211082b [file] [log] [blame]
/*
* Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion bool requireClientCertificate
* final
*
* @description Checks that property requireClientCertificate returns a default
* value false, if the corresponding parameter of bind method was not set.
* @author ngl@unipro.ru
*/
import "dart:io";
import "../../../Utils/expect.dart";
check(InternetAddress address) {
asyncStart();
SecurityContext sc = new SecurityContext(withTrustedRoots: true);
RawSecureServerSocket.bind(address, 0, sc).then((server) {
Expect.isFalse(server.requireClientCertificate);
server.close();
asyncEnd();
});
}
main() {
check(InternetAddress.anyIPv4);
check(InternetAddress.anyIPv6);
check(InternetAddress.loopbackIPv4);
check(InternetAddress.loopbackIPv6);
}