') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); ssh-key: bump elliptic curve and password hash deps; MSRV 1.65 by tarcieri · Pull Request #66 · RustCrypto/SSH · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ssh-key.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All@@ -80,7 +80,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workspace.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.64.0
toolchain: 1.67.0
components: clippy
override: true
profile: minimal
Expand Down
120 changes: 75 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions ssh-encoding/src/error.rs
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,16 +38,15 @@ impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
#[cfg(feature = "base64")]
Error::Base64(err) => write!(f, "Base64 encoding error: {}", err),
Error::Base64(err) => write!(f, "Base64 encoding error: {err}"),
Error::CharacterEncoding => write!(f, "character encoding invalid"),
Error::Length => write!(f, "length invalid"),
Error::Overflow => write!(f, "internal overflow error"),
#[cfg(feature = "pem")]
Error::Pem(err) => write!(f, "{}", err),
Error::Pem(err) => write!(f, "{err}"),
Error::TrailingData { remaining } => write!(
f,
"unexpected trailing data at end of message ({} bytes)",
remaining
"unexpected trailing data at end of message ({remaining} bytes)",
),
}
}
Expand DownExpand Up@@ -99,4 +98,14 @@ impl From<pem::Error> for Error {

#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl std::error::Error for Error {}
impl std::error::Error for Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match self {
#[cfg(feature = "base64")]
Self::Base64(err) => Some(err),
#[cfg(feature = "pem")]
Self::Pem(err) => Some(err),
_ => None,
}
}
}
14 changes: 7 additions & 7 deletions ssh-key/Cargo.toml
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,7 +14,7 @@ categories = ["authentication", "cryptography", "encoding", "no-std", "parser-im
keywords = ["crypto", "certificate", "openssh", "ssh", "sshsig"]
readme = "README.md"
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"

[dependencies]
encoding = { package = "ssh-encoding", version = "0.1", features = ["base64", "pem", "sha2"], path = "../ssh-encoding" }
Expand All@@ -26,15 +26,15 @@ zeroize = { version = "1", default-features = false }
# optional dependencies
aes = { version = "0.8", optional = true, default-features = false }
ctr = { version = "0.9", optional = true, default-features = false }
bcrypt-pbkdf = { version = "0.9", optional = true, default-features = false }
bcrypt-pbkdf = { version = "0.10", optional = true, default-features = false, features = ["alloc"] }
bigint = { package = "num-bigint-dig", version = "0.8", optional = true, default-features = false }
dsa = { version = "0.5", optional = true, default-features = false }
dsa = { version = "0.6", optional = true, default-features = false }
ed25519-dalek = { version = "=2.0.0-pre.0", optional = true, default-features = false }
p256 = { version = "0.12", optional = true, default-features = false, features = ["ecdsa"] }
p384 = { version = "0.12", optional = true, default-features = false, features = ["ecdsa"] }
rand_core = { version = "0.6", optional = true, default-features = false }
p256 = { version = "0.13", optional = true, default-features = false, features = ["ecdsa"] }
p384 = { version = "0.13", optional = true, default-features = false, features = ["ecdsa"] }
rand_core = { version = "0.6.4", optional = true, default-features = false }
rsa = { version = "0.8", optional = true, default-features = false }
sec1 = { version = "0.3", optional = true, default-features = false, features = ["point"] }
sec1 = { version = "0.7", optional = true, default-features = false, features = ["point"] }
serde = { version = "1", optional = true }
sha1 = { version = "0.10", optional = true, default-features = false }

Expand Down
Loading