Compare commits
3 Commits
eb42cd629e
...
8af3018b34
Author | SHA1 | Date | |
---|---|---|---|
8af3018b34 | |||
dd96cc4bf3 | |||
9e9a227332 |
@@ -16,11 +16,13 @@ impl CRLDistributionPointExt {
|
||||
let crl_bytes = asn1::write(|w| {
|
||||
w.write_element(&asn1::SequenceWriter::new(&|w| {
|
||||
w.write_element(&asn1::SequenceWriter::new(&|w| {
|
||||
w.write_tlv(tag_a0, |w| {
|
||||
w.write_tlv(tag_a0, None, |w: &mut asn1::WriteBuf| {
|
||||
w.push_slice(&asn1::write(|w| {
|
||||
w.write_tlv(tag_a0, |w| {
|
||||
w.write_tlv(tag_a0, None, |w: &mut asn1::WriteBuf| {
|
||||
w.push_slice(&asn1::write(|w| {
|
||||
w.write_tlv(tag_86, |b| b.push_slice(self.url.as_bytes()))?;
|
||||
w.write_tlv(tag_86, None, |b| {
|
||||
b.push_slice(self.url.as_bytes())
|
||||
})?;
|
||||
Ok(())
|
||||
})?)
|
||||
})?;
|
||||
|
@@ -174,17 +174,16 @@ fn gen_certificate(req: GenCertificateReq) -> anyhow::Result<(Option<Vec<u8>>, V
|
||||
cert_builder.set_not_after(¬_after)?;
|
||||
|
||||
// Specify CRL URL
|
||||
if let Some(issuer) = req.issuer {
|
||||
if let Some(crl) = &issuer.crl {
|
||||
if let Some(issuer) = req.issuer
|
||||
&& let Some(crl) = &issuer.crl
|
||||
{
|
||||
let crl_url = format!(
|
||||
"{}/pki/{}",
|
||||
AppConfig::get().unsecure_origin(),
|
||||
crl.file_name().unwrap().to_string_lossy()
|
||||
);
|
||||
|
||||
cert_builder
|
||||
.append_extension(CRLDistributionPointExt { url: crl_url }.as_extension()?)?;
|
||||
}
|
||||
cert_builder.append_extension(CRLDistributionPointExt { url: crl_url }.as_extension()?)?;
|
||||
}
|
||||
|
||||
// If cert is a CA or not
|
||||
@@ -424,15 +423,15 @@ fn refresh_crl(d: &CertData, new_cert: Option<&X509>) -> anyhow::Result<()> {
|
||||
}
|
||||
|
||||
// Add old entries
|
||||
if let Some(old_crl) = old_crl {
|
||||
if let Some(entries) = old_crl.get_revoked() {
|
||||
if let Some(old_crl) = old_crl
|
||||
&& let Some(entries) = old_crl.get_revoked()
|
||||
{
|
||||
for entry in entries {
|
||||
if X509_CRL_add0_revoked(crl, X509_REVOKED_dup(entry.as_ptr())) == 0 {
|
||||
return Err(PKIError::GenCRLError("X509_CRL_add0_revoked").into());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If requested, add new entry
|
||||
if let Some(new_cert) = new_cert {
|
||||
|
@@ -155,13 +155,12 @@ pub async fn sync_device(body: web::Json<JWTRequest>, actor: WebEnergyActor) ->
|
||||
let mut available_update = None;
|
||||
|
||||
// Check if the version is available
|
||||
if let Some(desired) = device.desired_version {
|
||||
if claims.info.version < desired
|
||||
if let Some(desired) = device.desired_version
|
||||
&& claims.info.version < desired
|
||||
&& ota_manager::update_exists(OTAPlatform::from_str(&claims.info.reference)?, &desired)?
|
||||
{
|
||||
available_update = Some(desired);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(HttpResponse::Ok().json(SyncResult {
|
||||
relays,
|
||||
|
@@ -123,18 +123,18 @@ pub async fn set_desired_version(
|
||||
|
||||
for d in devices {
|
||||
// Filter per platform
|
||||
if let Some(p) = body.platform {
|
||||
if d.info.reference != p.to_string() {
|
||||
if let Some(p) = body.platform
|
||||
&& d.info.reference != p.to_string()
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Filter per device
|
||||
if let Some(ids) = &body.devices {
|
||||
if !ids.contains(&d.id) {
|
||||
if let Some(ids) = &body.devices
|
||||
&& !ids.contains(&d.id)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
actor
|
||||
.send(energy_actor::SetDesiredVersion(
|
||||
|
95
central_frontend/package-lock.json
generated
95
central_frontend/package-lock.json
generated
@@ -30,7 +30,7 @@
|
||||
"@types/react-dom": "^19.1.7",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.39.1",
|
||||
"@typescript-eslint/parser": "^8.37.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
"@vitejs/plugin-react": "^4.7.0",
|
||||
"eslint": "^9.33.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
@@ -2349,16 +2349,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.39.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.39.1.tgz",
|
||||
"integrity": "sha512-pUXGCuHnnKw6PyYq93lLRiZm3vjuslIy7tus1lIQTYVK9bL8XBgJnCWm8a0KcTtHC84Yya1Q6rtll+duSMj0dg==",
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.41.0.tgz",
|
||||
"integrity": "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.39.1",
|
||||
"@typescript-eslint/types": "8.39.1",
|
||||
"@typescript-eslint/typescript-estree": "8.39.1",
|
||||
"@typescript-eslint/visitor-keys": "8.39.1",
|
||||
"@typescript-eslint/scope-manager": "8.41.0",
|
||||
"@typescript-eslint/types": "8.41.0",
|
||||
"@typescript-eslint/typescript-estree": "8.41.0",
|
||||
"@typescript-eslint/visitor-keys": "8.41.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2373,15 +2373,37 @@
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.39.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.39.1.tgz",
|
||||
"integrity": "sha512-RkBKGBrjgskFGWuyUGz/EtD8AF/GW49S21J8dvMzpJitOF1slLEbbHnNEtAHtnDAnx8qDEdRrULRnWVx27wGBw==",
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.41.0.tgz",
|
||||
"integrity": "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.39.1",
|
||||
"@typescript-eslint/visitor-keys": "8.39.1"
|
||||
"@typescript-eslint/tsconfig-utils": "^8.41.0",
|
||||
"@typescript-eslint/types": "^8.41.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.41.0.tgz",
|
||||
"integrity": "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.41.0",
|
||||
"@typescript-eslint/visitor-keys": "8.41.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -2391,10 +2413,27 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.41.0.tgz",
|
||||
"integrity": "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
|
||||
"version": "8.39.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.39.1.tgz",
|
||||
"integrity": "sha512-7sPDKQQp+S11laqTrhHqeAbsCfMkwJMrV7oTDvtDds4mEofJYir414bYKUEb8YPUm9QL3U+8f6L6YExSoAGdQw==",
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz",
|
||||
"integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -2406,16 +2445,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.39.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.1.tgz",
|
||||
"integrity": "sha512-EKkpcPuIux48dddVDXyQBlKdeTPMmALqBUbEk38McWv0qVEZwOpVJBi7ugK5qVNgeuYjGNQxrrnoM/5+TI/BPw==",
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.41.0.tgz",
|
||||
"integrity": "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.39.1",
|
||||
"@typescript-eslint/tsconfig-utils": "8.39.1",
|
||||
"@typescript-eslint/types": "8.39.1",
|
||||
"@typescript-eslint/visitor-keys": "8.39.1",
|
||||
"@typescript-eslint/project-service": "8.41.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.41.0",
|
||||
"@typescript-eslint/types": "8.41.0",
|
||||
"@typescript-eslint/visitor-keys": "8.41.0",
|
||||
"debug": "^4.3.4",
|
||||
"fast-glob": "^3.3.2",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -2435,13 +2474,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.39.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.1.tgz",
|
||||
"integrity": "sha512-W8FQi6kEh2e8zVhQ0eeRnxdvIoOkAp/CPAahcNio6nO9dsIwb9b34z90KOlheoyuVf6LSOEdjlkxSkapNEc+4A==",
|
||||
"version": "8.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz",
|
||||
"integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.39.1",
|
||||
"@typescript-eslint/types": "8.41.0",
|
||||
"eslint-visitor-keys": "^4.2.1"
|
||||
},
|
||||
"engines": {
|
||||
|
@@ -32,7 +32,7 @@
|
||||
"@types/react-dom": "^19.1.7",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.39.1",
|
||||
"@typescript-eslint/parser": "^8.37.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
"@vitejs/plugin-react": "^4.7.0",
|
||||
"eslint": "^9.33.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
|
Reference in New Issue
Block a user