]> Cypherpunks.ru repositories - ucspi.git/blobdiff - x509.go
Unify copyright comment format
[ucspi.git] / x509.go
diff --git a/x509.go b/x509.go
index c8d9f9e1c234774f991c5127a567ce9c6da18d19..c41641f9b878f4867edf2177507d5c9c6c8e3c05 100644 (file)
--- a/x509.go
+++ b/x509.go
@@ -1,19 +1,17 @@
-/*
-ucspi -- UCSPI-related utilities
-Copyright (C) 2021-2022 Sergey Matveev <stargrave@stargrave.org>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU 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 General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
+// ucspi -- UCSPI-related utilities
+// Copyright (C) 2021-2024 Sergey Matveev <stargrave@stargrave.org>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 package ucspi
 
@@ -21,12 +19,12 @@ import (
        "crypto/x509"
        "encoding/pem"
        "errors"
-       "io/ioutil"
+       "os"
 )
 
 func CertificateFromFile(p string) (b []byte, c *x509.Certificate, err error) {
        var data []byte
-       data, err = ioutil.ReadFile(p)
+       data, err = os.ReadFile(p)
        if err != nil {
                return
        }
@@ -48,7 +46,7 @@ func CertificateFromFile(p string) (b []byte, c *x509.Certificate, err error) {
 
 func PrivateKeyFromFile(p string) (prv interface{}, err error) {
        var data []byte
-       data, err = ioutil.ReadFile(p)
+       data, err = os.ReadFile(p)
        if err != nil {
                return
        }
@@ -73,7 +71,7 @@ func PrivateKeyFromFile(p string) (prv interface{}, err error) {
 
 func CertPoolFromFile(p string) (certs []*x509.Certificate, pool *x509.CertPool, err error) {
        var data []byte
-       data, err = ioutil.ReadFile(p)
+       data, err = os.ReadFile(p)
        if err != nil {
                return
        }