2022-04-24 07:25:04 +00:00
|
|
|
/*
|
|
|
|
Copyright 2021-2022 CAcert Inc.
|
|
|
|
SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2021-08-23 18:53:43 +00:00
|
|
|
package revoking
|
|
|
|
|
2022-04-23 17:37:42 +00:00
|
|
|
import (
|
|
|
|
"crypto/x509/pkix"
|
2022-04-24 10:45:22 +00:00
|
|
|
"math/big"
|
2022-04-23 17:37:42 +00:00
|
|
|
)
|
|
|
|
|
2021-08-23 18:53:43 +00:00
|
|
|
// A Repository for storing certificate status information
|
|
|
|
type Repository interface {
|
|
|
|
// StoreRevocation stores information about a revoked certificate.
|
2022-04-23 17:37:42 +00:00
|
|
|
StoreRevocation(*pkix.RevokedCertificate) error
|
2022-11-30 17:47:18 +00:00
|
|
|
LoadCRL(*big.Int) ([]byte, error)
|
|
|
|
StoreCRL(*big.Int, []byte) error
|
2022-04-23 17:37:42 +00:00
|
|
|
RevokedCertificates() ([]pkix.RevokedCertificate, error)
|
2022-04-24 10:45:22 +00:00
|
|
|
NextCRLNumber() (*big.Int, error)
|
2022-11-30 17:47:18 +00:00
|
|
|
CleanUp()
|
2021-08-23 18:53:43 +00:00
|
|
|
}
|