From 0c3851c01706fdf3587c4be9b94e42069b7ad70b Mon Sep 17 00:00:00 2001 From: Jonathan Claudius Date: Wed, 30 Jan 2019 15:34:37 -0500 Subject: [PATCH] HTTPS all the things --- LICENSE-APACHE | 4 ++-- LICENSE-THIRD-PARTY | 12 ++++++------ README.md | 2 +- src/bin/cargo/commands/pkgid.rs | 2 +- src/cargo/core/package_id_spec.rs | 18 +++++++++--------- src/cargo/ops/cargo_package.rs | 2 +- .../ops/common_for_install_and_uninstall.rs | 2 +- src/cargo/ops/registry.rs | 4 ++-- src/doc/man/cargo.adoc | 2 +- src/doc/man/generated/cargo.html | 2 +- src/doc/src/reference/manifest.md | 2 +- src/doc/src/reference/pkgid-spec.md | 2 +- src/etc/man/cargo.1 | 2 +- tests/testsuite/bad_config.rs | 14 +++++++------- tests/testsuite/build.rs | 8 ++++---- tests/testsuite/build_auth.rs | 6 +++--- tests/testsuite/git.rs | 2 +- tests/testsuite/package.rs | 18 +++++++++--------- tests/testsuite/resolve.rs | 16 ++++++++-------- tests/testsuite/support/resolver.rs | 2 +- 20 files changed, 61 insertions(+), 61 deletions(-) diff --git a/LICENSE-APACHE b/LICENSE-APACHE index 16fe87b06..c98d27d4f 100644 --- a/LICENSE-APACHE +++ b/LICENSE-APACHE @@ -1,6 +1,6 @@ Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/LICENSE-2.0 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -192,7 +192,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/LICENSE-THIRD-PARTY b/LICENSE-THIRD-PARTY index c9897b96f..8f83ab502 100644 --- a/LICENSE-THIRD-PARTY +++ b/LICENSE-THIRD-PARTY @@ -3,7 +3,7 @@ depends on a number of libraries which carry their own copyright notices and license terms. These libraries are normally all linked static into the binary distributions of Cargo: -* OpenSSL - http://www.openssl.org/source/license.html +* OpenSSL - https://www.openssl.org/source/license.html Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. @@ -22,7 +22,7 @@ distributions of Cargo: 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project - for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + for use in the OpenSSL Toolkit. (https://www.openssl.org/)" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without @@ -36,7 +36,7 @@ distributions of Cargo: 6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project - for use in the OpenSSL Toolkit (http://www.openssl.org/)" + for use in the OpenSSL Toolkit (https://www.openssl.org/)" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -1037,7 +1037,7 @@ distributions of Cargo: ---------------------------------------------------------------------- -* libssh2 - http://www.libssh2.org/license.html +* libssh2 - https://www.libssh2.org/license.html Copyright (c) 2004-2007 Sara Golemon Copyright (c) 2005,2006 Mikhail Gusarov @@ -1080,7 +1080,7 @@ distributions of Cargo: USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* libcurl - http://curl.haxx.se/docs/copyright.html +* libcurl - https://curl.haxx.se/docs/copyright.html COPYRIGHT AND PERMISSION NOTICE @@ -1268,5 +1268,5 @@ distributions of Cargo: ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - For more information, please refer to + For more information, please refer to diff --git a/README.md b/README.md index d38aefa23..fb89d2290 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ See LICENSE-APACHE and LICENSE-MIT for details. ### Third party software This product includes software developed by the OpenSSL Project -for use in the OpenSSL Toolkit (http://www.openssl.org/). +for use in the OpenSSL Toolkit (https://www.openssl.org/). In binary form, this product includes software that is licensed under the terms of the GNU General Public License, version 2, with a linking exception, diff --git a/src/bin/cargo/commands/pkgid.rs b/src/bin/cargo/commands/pkgid.rs index 30565744d..2faaf8084 100644 --- a/src/bin/cargo/commands/pkgid.rs +++ b/src/bin/cargo/commands/pkgid.rs @@ -27,7 +27,7 @@ Example Package IDs crates.io/foo | foo | * | *://crates.io/foo crates.io/foo#1.2.3 | foo | 1.2.3 | *://crates.io/foo crates.io/bar#foo:1.2.3 | foo | 1.2.3 | *://crates.io/bar - http://crates.io/foo#1.2.3 | foo | 1.2.3 | http://crates.io/foo + https://crates.io/foo#1.2.3 | foo | 1.2.3 | https://crates.io/foo ", ) } diff --git a/src/cargo/core/package_id_spec.rs b/src/cargo/core/package_id_spec.rs index 5c8421b83..b6cce0c75 100644 --- a/src/cargo/core/package_id_spec.rs +++ b/src/cargo/core/package_id_spec.rs @@ -35,8 +35,8 @@ impl PackageIdSpec { /// use cargo::core::PackageIdSpec; /// /// let specs = vec![ - /// "http://crates.io/foo#1.2.3", - /// "http://crates.io/foo#bar:1.2.3", + /// "https://crates.io/foo#1.2.3", + /// "https://crates.io/foo#bar:1.2.3", /// "crates.io/foo", /// "crates.io/foo#1.2.3", /// "crates.io/foo#bar", @@ -286,19 +286,19 @@ mod tests { } ok( - "http://crates.io/foo#1.2.3", + "https://crates.io/foo#1.2.3", PackageIdSpec { name: "foo".to_string(), version: Some("1.2.3".to_semver().unwrap()), - url: Some(Url::parse("http://crates.io/foo").unwrap()), + url: Some(Url::parse("https://crates.io/foo").unwrap()), }, ); ok( - "http://crates.io/foo#bar:1.2.3", + "https://crates.io/foo#bar:1.2.3", PackageIdSpec { name: "bar".to_string(), version: Some("1.2.3".to_semver().unwrap()), - url: Some(Url::parse("http://crates.io/foo").unwrap()), + url: Some(Url::parse("https://crates.io/foo").unwrap()), }, ); ok( @@ -356,13 +356,13 @@ mod tests { assert!(PackageIdSpec::parse("baz:").is_err()); assert!(PackageIdSpec::parse("baz:*").is_err()); assert!(PackageIdSpec::parse("baz:1.0").is_err()); - assert!(PackageIdSpec::parse("http://baz:1.0").is_err()); - assert!(PackageIdSpec::parse("http://#baz:1.0").is_err()); + assert!(PackageIdSpec::parse("https://baz:1.0").is_err()); + assert!(PackageIdSpec::parse("https://#baz:1.0").is_err()); } #[test] fn matching() { - let url = Url::parse("http://example.com").unwrap(); + let url = Url::parse("https://example.com").unwrap(); let sid = SourceId::for_registry(&url).unwrap(); let foo = PackageId::new("foo", "1.2.3", sid).unwrap(); let bar = PackageId::new("bar", "1.2.3", sid).unwrap(); diff --git a/src/cargo/ops/cargo_package.rs b/src/cargo/ops/cargo_package.rs index a8f92ad2f..0a3659226 100644 --- a/src/cargo/ops/cargo_package.rs +++ b/src/cargo/ops/cargo_package.rs @@ -152,7 +152,7 @@ fn check_metadata(pkg: &Package, config: &Config) -> CargoResult<()> { config.shell().warn(&format!( "manifest has no {things}.\n\ - See http://doc.crates.io/manifest.html#package-metadata for more info.", + See https://doc.rust-lang.org/cargo/reference/manifest.html for more info.", things = things ))? } diff --git a/src/cargo/ops/common_for_install_and_uninstall.rs b/src/cargo/ops/common_for_install_and_uninstall.rs index 517818150..ae9ddd914 100644 --- a/src/cargo/ops/common_for_install_and_uninstall.rs +++ b/src/cargo/ops/common_for_install_and_uninstall.rs @@ -92,7 +92,7 @@ where "the `--vers` provided, `{}`, is \ not a valid semver version requirement\n\n Please have a look at \ - http://doc.crates.io/specifying-dependencies.html \ + https://doc.crates.io/specifying-dependencies.html \ for the correct format", v ), diff --git a/src/cargo/ops/registry.rs b/src/cargo/ops/registry.rs index 04cf28869..66354ab73 100644 --- a/src/cargo/ops/registry.rs +++ b/src/cargo/ops/registry.rs @@ -290,7 +290,7 @@ fn transmit( the following are not valid badges and were ignored: {}. \ Either the badge type specified is unknown or a required \ attribute is missing. Please see \ - http://doc.crates.io/manifest.html#package-metadata \ + https://doc.rust-lang.org/cargo/reference/manifest.html \ for valid badge types and their required attributes.", warnings.invalid_badges.join(", ") ); @@ -763,7 +763,7 @@ pub fn search( ); } else if total_crates > limit && limit >= search_max_limit { println!( - "... and {} crates more (go to http://crates.io/search?q={} to see more)", + "... and {} crates more (go to https://crates.io/search?q={} to see more)", total_crates - limit, percent_encode(query.as_bytes(), QUERY_ENCODE_SET) ); diff --git a/src/doc/man/cargo.adoc b/src/doc/man/cargo.adoc index 69f879bac..2610ec337 100644 --- a/src/doc/man/cargo.adoc +++ b/src/doc/man/cargo.adoc @@ -17,7 +17,7 @@ cargo - The Rust package manager == DESCRIPTION This program is a package manager and build tool for the Rust language, -available at . +available at . == COMMANDS diff --git a/src/doc/man/generated/cargo.html b/src/doc/man/generated/cargo.html index 63ae81406..04a3ce8bb 100644 --- a/src/doc/man/generated/cargo.html +++ b/src/doc/man/generated/cargo.html @@ -19,7 +19,7 @@

This program is a package manager and build tool for the Rust language, -available at http://rust-lang.org.

+available at https://rust-lang.org.

diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 3788037a6..825e56d0d 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -32,7 +32,7 @@ name such as "nul", is not too long, etc. #### The `version` field Cargo bakes in the concept of [Semantic -Versioning](http://semver.org/), so make sure you follow some basic rules: +Versioning](https://semver.org/), so make sure you follow some basic rules: * Before you reach 1.0.0, anything goes, but if you make breaking changes, increment the minor version. In Rust, breaking changes include adding fields to diff --git a/src/doc/src/reference/pkgid-spec.md b/src/doc/src/reference/pkgid-spec.md index bd7ac2d92..c921d51ba 100644 --- a/src/doc/src/reference/pkgid-spec.md +++ b/src/doc/src/reference/pkgid-spec.md @@ -34,7 +34,7 @@ registry at `crates.io` | `crates.io/foo` | `foo` | `*` | `*://crates.io/foo` | | `crates.io/foo#1.2.3` | `foo` | `1.2.3` | `*://crates.io/foo` | | `crates.io/bar#foo:1.2.3` | `foo` | `1.2.3` | `*://crates.io/bar` | -| `http://crates.io/foo#1.2.3` | `foo` | `1.2.3` | `http://crates.io/foo` | +| `https://crates.io/foo#1.2.3`| `foo` | `1.2.3` | `https://crates.io/foo` | #### Brevity of specifications diff --git a/src/etc/man/cargo.1 b/src/etc/man/cargo.1 index a1a5be5bc..ab97fe546 100644 --- a/src/etc/man/cargo.1 +++ b/src/etc/man/cargo.1 @@ -44,7 +44,7 @@ cargo \- The Rust package manager .sp This program is a package manager and build tool for the Rust language, available at \c -.URL "http://rust\-lang.org" "" "." +.URL "https://rust\-lang.org" "" "." .SH "COMMANDS" .SS "Build Commands" .sp diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index 01063fc4a..7c6770a3c 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -910,7 +910,7 @@ fn bad_source_config2() { ".cargo/config", r#" [source.crates-io] - registry = 'http://example.com' + registry = 'https://example.com' replace-with = 'bar' "#, ) @@ -953,7 +953,7 @@ fn bad_source_config3() { ".cargo/config", r#" [source.crates-io] - registry = 'http://example.com' + registry = 'https://example.com' replace-with = 'crates-io' "#, ) @@ -995,11 +995,11 @@ fn bad_source_config4() { ".cargo/config", r#" [source.crates-io] - registry = 'http://example.com' + registry = 'https://example.com' replace-with = 'bar' [source.bar] - registry = 'http://example.com' + registry = 'https://example.com' replace-with = 'crates-io' "#, ) @@ -1042,7 +1042,7 @@ fn bad_source_config5() { ".cargo/config", r#" [source.crates-io] - registry = 'http://example.com' + registry = 'https://example.com' replace-with = 'bar' [source.bar] @@ -1115,7 +1115,7 @@ fn bad_source_config6() { ".cargo/config", r#" [source.crates-io] - registry = 'http://example.com' + registry = 'https://example.com' replace-with = ['not', 'a', 'string'] "#, ) @@ -1176,7 +1176,7 @@ fn bad_source_config7() { ".cargo/config", r#" [source.foo] - registry = 'http://example.com' + registry = 'https://example.com' local-registry = 'file:///another/file' "#, ) diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index bd54ab648..4292fc53e 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -1446,8 +1446,8 @@ fn crate_env_vars() { name = "foo" version = "0.5.1-alpha.1" description = "This is foo" - homepage = "http://example.com" - repository = "http://example.com/repo.git" + homepage = "https://example.com" + repository = "https://example.com/repo.git" authors = ["wycats@example.com"] "#, ) @@ -1475,8 +1475,8 @@ fn crate_env_vars() { assert_eq!(s, foo::version()); println!("{}", s); assert_eq!("foo", PKG_NAME); - assert_eq!("http://example.com", HOMEPAGE); - assert_eq!("http://example.com/repo.git", REPOSITORY); + assert_eq!("https://example.com", HOMEPAGE); + assert_eq!("https://example.com/repo.git", REPOSITORY); assert_eq!("This is foo", DESCRIPTION); let s = format!("{}.{}.{}-{}", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_PRE); diff --git a/tests/testsuite/build_auth.rs b/tests/testsuite/build_auth.rs index 78d4c4555..bd061edaa 100644 --- a/tests/testsuite/build_auth.rs +++ b/tests/testsuite/build_auth.rs @@ -105,7 +105,7 @@ fn http_auth_offered() { authors = [] [dependencies.bar] - git = "http://127.0.0.1:{}/foo/bar" + git = "https://127.0.0.1:{}/foo/bar" "#, addr.port() ), @@ -126,11 +126,11 @@ fn http_auth_offered() { .with_status(101) .with_stderr_contains(&format!( "\ -[UPDATING] git repository `http://{addr}/foo/bar` +[UPDATING] git repository `https://{addr}/foo/bar` [ERROR] failed to load source for a dependency on `bar` Caused by: - Unable to update http://{addr}/foo/bar + Unable to update https://{addr}/foo/bar Caused by: failed to clone into: [..] diff --git a/tests/testsuite/git.rs b/tests/testsuite/git.rs index 9ed1345f8..c9cd8fc8f 100644 --- a/tests/testsuite/git.rs +++ b/tests/testsuite/git.rs @@ -2714,7 +2714,7 @@ fn failed_submodule_checkout() { }); let repo = git2::Repository::open(&git_project2.root()).unwrap(); - let url = format!("http://{}:{}/", addr.ip(), addr.port()); + let url = format!("https://{}:{}/", addr.ip(), addr.port()); { let mut s = repo.submodule(&url, Path::new("bar"), false).unwrap(); let subrepo = s.open().unwrap(); diff --git a/tests/testsuite/package.rs b/tests/testsuite/package.rs index fe2e392e9..0caa40b0e 100644 --- a/tests/testsuite/package.rs +++ b/tests/testsuite/package.rs @@ -70,7 +70,7 @@ fn metadata_warning() { "\ warning: manifest has no description, license, license-file, documentation, \ homepage or repository. -See http://doc.crates.io/manifest.html#package-metadata for more info. +See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([CWD]) [VERIFYING] foo v0.0.1 ([CWD]) [COMPILING] foo v0.0.1 ([CWD][..]) @@ -96,7 +96,7 @@ See http://doc.crates.io/manifest.html#package-metadata for more info. .with_stderr( "\ warning: manifest has no description, documentation, homepage or repository. -See http://doc.crates.io/manifest.html#package-metadata for more info. +See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([CWD]) [VERIFYING] foo v0.0.1 ([CWD]) [COMPILING] foo v0.0.1 ([CWD][..]) @@ -149,7 +149,7 @@ fn package_verbose() { .with_stderr( "\ [WARNING] manifest has no description[..] -See http://doc.crates.io/manifest.html#package-metadata for more info. +See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([..]) [ARCHIVING] [..] [ARCHIVING] [..] @@ -186,7 +186,7 @@ See http://doc.crates.io/manifest.html#package-metadata for more info. .with_stderr( "\ [WARNING] manifest has no description[..] -See http://doc.crates.io/manifest.html#package-metadata for more info. +See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] a v0.0.1 ([..]) [ARCHIVING] Cargo.toml [ARCHIVING] src/lib.rs @@ -204,7 +204,7 @@ fn package_verification() { .with_stderr( "\ [WARNING] manifest has no description[..] -See http://doc.crates.io/manifest.html#package-metadata for more info. +See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([CWD]) [VERIFYING] foo v0.0.1 ([CWD]) [COMPILING] foo v0.0.1 ([CWD][..]) @@ -280,7 +280,7 @@ fn path_dependency_no_version() { .with_stderr( "\ [WARNING] manifest has no documentation, homepage or repository. -See http://doc.crates.io/manifest.html#package-metadata for more info. +See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [ERROR] all path dependencies must have a version specified when packaging. dependency `bar` does not specify a version. ", @@ -363,7 +363,7 @@ fn exclude() { .with_stderr( "\ [WARNING] manifest has no description[..] -See http://doc.crates.io/manifest.html#package-metadata for more info. +See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [WARNING] [..] file `dir_root_1/some_dir/file` WILL be excluded [..] See [..] [WARNING] [..] file `dir_root_2/some_dir/file` WILL be excluded [..] @@ -455,7 +455,7 @@ fn include() { .with_stderr( "\ [WARNING] manifest has no description[..] -See http://doc.crates.io/manifest.html#package-metadata for more info. +See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([..]) [ARCHIVING] [..] [ARCHIVING] [..] @@ -569,7 +569,7 @@ fn ignore_nested() { .with_stderr( "\ [WARNING] manifest has no documentation[..] -See http://doc.crates.io/manifest.html#package-metadata for more info. +See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([CWD]) [VERIFYING] foo v0.0.1 ([CWD]) [COMPILING] foo v0.0.1 ([CWD][..]) diff --git a/tests/testsuite/resolve.rs b/tests/testsuite/resolve.rs index 7174a70a3..6c9bb39f0 100644 --- a/tests/testsuite/resolve.rs +++ b/tests/testsuite/resolve.rs @@ -289,24 +289,24 @@ fn test_resolving_common_transitive_deps() { #[test] fn test_resolving_with_same_name() { let list = vec![ - pkg_loc("foo", "http://first.example.com"), - pkg_loc("bar", "http://second.example.com"), + pkg_loc("foo", "https://first.example.com"), + pkg_loc("bar", "https://second.example.com"), ]; let reg = registry(list); let res = resolve( &pkg_id("root"), vec![ - dep_loc("foo", "http://first.example.com"), - dep_loc("bar", "http://second.example.com"), + dep_loc("foo", "https://first.example.com"), + dep_loc("bar", "https://second.example.com"), ], ®, ) .unwrap(); let mut names = loc_names(&[ - ("foo", "http://first.example.com"), - ("bar", "http://second.example.com"), + ("foo", "https://first.example.com"), + ("bar", "https://second.example.com"), ]); names.push(pkg_id("root")); @@ -1175,8 +1175,8 @@ fn resolving_but_no_exists() { res.err().unwrap().to_string(), "\ no matching package named `foo` found\n\ - location searched: registry `http://example.com/`\n\ - required by package `root v1.0.0 (registry `http://example.com/`)`\ + location searched: registry `https://example.com/`\n\ + required by package `root v1.0.0 (registry `https://example.com/`)`\ " ); } diff --git a/tests/testsuite/support/resolver.rs b/tests/testsuite/support/resolver.rs index 4e71b70ee..54e83b211 100644 --- a/tests/testsuite/support/resolver.rs +++ b/tests/testsuite/support/resolver.rs @@ -176,7 +176,7 @@ macro_rules! pkg { fn registry_loc() -> SourceId { lazy_static::lazy_static! { static ref EXAMPLE_DOT_COM: SourceId = - SourceId::for_registry(&"http://example.com".to_url().unwrap()).unwrap(); + SourceId::for_registry(&"https://example.com".to_url().unwrap()).unwrap(); } *EXAMPLE_DOT_COM }