-// CKEKS -- C99 KEKS encoder implementation
+// pub-verify -- verify a chain of cm/pub keys
// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify
+// test-vector -- KEKS test structure
+// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation, version 3 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
-// GoKEKS -- Go KEKS codec implementation
+// test-vector -- KEKS test structure
// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify
"go.cypherpunks.su/tai64n/v4"
)
+func usage() {
+ fmt.Fprintf(os.Stderr, `Usage: pp [options] <DATA.keks
+
+`)
+ flag.PrintDefaults()
+ fmt.Fprintf(os.Stderr, `
+/that/keks/path specifies some exact element of the structure.
+For example, /sigs/0/tbs will show only tbs field of the first signature in
+cm/pub structure. With "-v -p /sigs/0/tbs/sid" option you will get hexadecimal
+value of the signature's sid.
+`)
+}
+
var (
MaxStrLen = flag.Uint("max-str-len", 64,
"Maximal string length to print")
}
case types.Hexlet:
h := iter.Hexlet()
- fmt.Println(h.UUID(), h.IP())
+ if *onlyV {
+ fmt.Println(h.UUID())
+ } else {
+ fmt.Println(h.UUID(), h.IP())
+ }
case types.UInt:
fmt.Println(iter.UInt())
case types.Int:
}
func main() {
+ flag.Usage = usage
flag.Parse()
if *pthStr != "" {
pth = strings.Split(strings.TrimLeft(*pthStr, "/"), "/")
-// schema-validate KEKS data structures validator
+// schema-validate -- KEKS data structures validator
// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify
+// test-vector-anys -- KEKS test structure with any-types
+// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation, version 3 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program. If not, see <http://www.gnu.org/licenses/>.
+
package main
import (
+// test-vector-manual -- KEKS test structure with manually encoded fields
+// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation, version 3 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program. If not, see <http://www.gnu.org/licenses/>.
+
package main
import (
-// GoKEKS -- Go KEKS codec implementation
+// textdump-tester -- test utility for Python's textdump-tester
// Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify