package network
#include "gen_qocspresponse.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QOcspCertificateStatus int
const (
QOcspCertificateStatus__Good QOcspCertificateStatus = 0
QOcspCertificateStatus__Revoked QOcspCertificateStatus = 1
QOcspCertificateStatus__Unknown QOcspCertificateStatus = 2
)
type QOcspRevocationReason int
const (
QOcspRevocationReason__None QOcspRevocationReason = -1
QOcspRevocationReason__Unspecified QOcspRevocationReason = 0
QOcspRevocationReason__KeyCompromise QOcspRevocationReason = 1
QOcspRevocationReason__CACompromise QOcspRevocationReason = 2
QOcspRevocationReason__AffiliationChanged QOcspRevocationReason = 3
QOcspRevocationReason__Superseded QOcspRevocationReason = 4
QOcspRevocationReason__CessationOfOperation QOcspRevocationReason = 5
QOcspRevocationReason__CertificateHold QOcspRevocationReason = 6
QOcspRevocationReason__RemoveFromCRL QOcspRevocationReason = 7
)
type QOcspResponse struct {
h *C.QOcspResponse
}
func (this *QOcspResponse) cPointer() *C.QOcspResponse {
if this == nil {
return nil
}
return this.h
}
func (this *QOcspResponse) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
func newQOcspResponse(h *C.QOcspResponse) *QOcspResponse {
if h == nil {
return nil
}
return &QOcspResponse{h: h}
}
func UnsafeNewQOcspResponse(h unsafe.Pointer) *QOcspResponse {
return newQOcspResponse((*C.QOcspResponse)(h))
}
func NewQOcspResponse() *QOcspResponse {
return newQOcspResponse(C.QOcspResponse_new())
}
func NewQOcspResponse2(other *QOcspResponse) *QOcspResponse {
return newQOcspResponse(C.QOcspResponse_new2(other.cPointer()))
}
func (this *QOcspResponse) OperatorAssign(other *QOcspResponse) {
C.QOcspResponse_operatorAssign(this.h, other.cPointer())
}
func (this *QOcspResponse) CertificateStatus() QOcspCertificateStatus {
return (QOcspCertificateStatus)(C.QOcspResponse_certificateStatus(this.h))
}
func (this *QOcspResponse) RevocationReason() QOcspRevocationReason {
return (QOcspRevocationReason)(C.QOcspResponse_revocationReason(this.h))
}
func (this *QOcspResponse) Responder() *QSslCertificate {
_goptr := newQSslCertificate(C.QOcspResponse_responder(this.h))
_goptr.GoGC()
return _goptr
}
func (this *QOcspResponse) Subject() *QSslCertificate {
_goptr := newQSslCertificate(C.QOcspResponse_subject(this.h))
_goptr.GoGC()
return _goptr
}
func (this *QOcspResponse) Swap(other *QOcspResponse) {
C.QOcspResponse_swap(this.h, other.cPointer())
}
func (this *QOcspResponse) Delete() {
C.QOcspResponse_delete(this.h)
}
func (this *QOcspResponse) GoGC() {
runtime.SetFinalizer(this, func(this *QOcspResponse) {
this.Delete()
runtime.KeepAlive(this.h)
})
}