mirror of
https://github.com/RedTeamPentesting/adauth
synced 2026-06-08 12:20:46 +00:00
pkinit: Use explicit integer types to support 32-bit builds
This commit is contained in:
+4
-11
@@ -23,7 +23,7 @@ var (
|
||||
)
|
||||
|
||||
type SignerInfo struct {
|
||||
Version int `asn1:"default:1"`
|
||||
Version uint64 `asn1:"default:1"`
|
||||
IssuerAndSerialNumber IssuerAndSerial
|
||||
DigestAlgorithm pkix.AlgorithmIdentifier
|
||||
AuthenticatedAttributes []Attribute `asn1:"optional,omitempty,tag:0"`
|
||||
@@ -48,7 +48,7 @@ type ContentInfo struct {
|
||||
}
|
||||
|
||||
type SignedData struct {
|
||||
Version int `asn1:"default:1"`
|
||||
Version uint64 `asn1:"default:1"`
|
||||
DigestAlgorithmIdentifiers []pkix.AlgorithmIdentifier `asn1:"set"`
|
||||
ContentInfo ContentInfo
|
||||
Certificates RawCertificates `asn1:"optional,tag:0"`
|
||||
@@ -95,9 +95,9 @@ type PKAuthenticator struct {
|
||||
// paChecksum [3] OCTET STRING OPTIONAL,
|
||||
// ...
|
||||
// asn1
|
||||
CUSec int `asn1:"tag:0,explicit"`
|
||||
CUSec uint32 `asn1:"tag:0,explicit"`
|
||||
CTime time.Time `asn1:"tag:1,explicit,generalized"`
|
||||
Nonce int `asn1:"tag:2,explicit"`
|
||||
Nonce uint32 `asn1:"tag:2,explicit"`
|
||||
Checksum []byte `asn1:"tag:3,explicit,optional"`
|
||||
}
|
||||
|
||||
@@ -167,10 +167,3 @@ type KDCDHKeyInfo struct {
|
||||
Nonce *big.Int `asn1:"tag:1,explicit"`
|
||||
DHKeyExpication time.Time `asn1:"tag:2,explicit,optional,generalized"`
|
||||
}
|
||||
|
||||
type AuthoirzationDataElement struct {
|
||||
ADType int `asn1:"tag:0"`
|
||||
ADData []byte `asn1:"tag:1"`
|
||||
}
|
||||
|
||||
type AuthoirzationData []AuthoirzationDataElement
|
||||
|
||||
+2
-2
@@ -51,9 +51,9 @@ func ConfigureASReq(
|
||||
|
||||
authPack := AuthPack{
|
||||
PKAuthenticator: PKAuthenticator{
|
||||
CUSec: int(now.UnixMicro() - now.Truncate(time.Millisecond).UnixMicro()),
|
||||
CUSec: uint32(now.UnixMicro() - now.Truncate(time.Millisecond).UnixMicro()),
|
||||
CTime: now,
|
||||
Nonce: mathRand.Intn(4294967295), //nolint:gosec
|
||||
Nonce: mathRand.Uint32(), //nolint:gosec
|
||||
Checksum: pkAuthenticatorChecksum,
|
||||
},
|
||||
ClientPublicValue: SubjectPublicKeyInfo{
|
||||
|
||||
Reference in New Issue
Block a user