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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

env:
FOUNDRY_PROFILE: ci
FOUNDRY_PROFILE: default

jobs:
check:
Expand Down
4 changes: 2 additions & 2 deletions src/Asn1Decode.sol
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ library Asn1Decode {
int256 _month = int256(month);
int256 _day = int256(day);

int256 _days = _day - 32075 + 1461 * (_year + 4800 + (_month - 14) / 12) / 4
+ 367 * (_month - 2 - (_month - 14) / 12 * 12) / 12 - 3 * ((_year + 4900 + (_month - 14) / 12) / 100) / 4
int256 _days = _day - 32075 + 1461 * (_year + 4800 + (_month - 14) / 12) / 4 + 367
* (_month - 2 - (_month - 14) / 12 * 12) / 12 - 3 * ((_year + 4900 + (_month - 14) / 12) / 100) / 4
- 2440588;

return ((uint256(_days) * 24 + hour) * 60 + minute) * 60 + second;
Expand Down
13 changes: 5 additions & 8 deletions src/CertManager.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;
pragma solidity ^0.8.15;

import {Sha2Ext} from "./Sha2Ext.sol";
import {Asn1Decode, Asn1Ptr, LibAsn1Ptr} from "./Asn1Decode.sol";
Expand Down Expand Up @@ -104,8 +104,9 @@ contract CertManager is ICertManager {

_verifyCertSignature(certificate, tbsCertPtr, parent.pubKey);

cert =
VerifiedCert({ca: ca, notAfter: notAfter, maxPathLen: maxPathLen, subjectHash: subjectHash, pubKey: pubKey});
cert = VerifiedCert({
ca: ca, notAfter: notAfter, maxPathLen: maxPathLen, subjectHash: subjectHash, pubKey: pubKey
});
_saveVerified(certHash, cert);

emit CertVerified(certHash);
Expand Down Expand Up @@ -313,11 +314,7 @@ contract CertManager is ICertManager {
}
bytes memory pubKey = packed.slice(0x31, packed.length - 0x31);
return VerifiedCert({
ca: ca != 0,
notAfter: notAfter,
maxPathLen: maxPathLen,
subjectHash: subjectHash,
pubKey: pubKey
ca: ca != 0, notAfter: notAfter, maxPathLen: maxPathLen, subjectHash: subjectHash, pubKey: pubKey
});
}
}
8 changes: 1 addition & 7 deletions src/ECDSA384Curve.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@ library ECDSA384Curve {

function p384() internal pure returns (ECDSA384.Parameters memory) {
return ECDSA384.Parameters({
a: CURVE_A,
b: CURVE_B,
gx: CURVE_GX,
gy: CURVE_GY,
p: CURVE_P,
n: CURVE_N,
lowSmax: CURVE_LOW_S_MAX
a: CURVE_A, b: CURVE_B, gx: CURVE_GX, gy: CURVE_GY, p: CURVE_P, n: CURVE_N, lowSmax: CURVE_LOW_S_MAX
});
}
}
Loading