| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767 |
- package advancedsecurity
- import (
- "context"
- "encoding/xml"
- "time"
- "lc/common/onvif/soap"
- )
- // against "unused imports"
- var _ time.Time
- var _ xml.Name
- // Unique identifier for keys in the keystore.
- // KeyID type
- type KeyID NCName
- // Unique identifier for certificates in the keystore.
- // CertificateID type
- type CertificateID NCName
- // Unique identifier for certification paths in the keystore.
- // CertificationPathID type
- type CertificationPathID NCName
- // Unique identifier for passphrases in the keystore.
- // PassphraseID type
- type PassphraseID NCName
- // Unique identifier for 802.1X configurations in the keystore.
- // Dot1XID type
- type Dot1XID NCName
- // The status of a key in the keystore.
- // KeyStatus type
- type KeyStatus string
- const (
- // KeyStatusOk const
- // Key is ready for use
- KeyStatusOk KeyStatus = "ok"
- // KeyStatusGenerating const
- // Key is being generated
- KeyStatusGenerating KeyStatus = "generating"
- // KeyStatusCorrupt const
- // Key has not been successfully generated and cannot be used.
- KeyStatusCorrupt KeyStatus = "corrupt"
- )
- // An object identifier (OID) in dot-decimal form as specified in RFC4512.
- // DotDecimalOID type
- type DotDecimalOID string
- // The distinguished name attribute type encoded as specified in RFC 4514.
- // DNAttributeType type
- type DNAttributeType string
- // DNAttributeValue type
- type DNAttributeValue string
- // A base64-encoded ASN.1 value.
- // Base64DERencodedASN1Value type
- type Base64DERencodedASN1Value []byte
- // A list of supported 802.1X authentication methods, such as "EAP-PEAP/MSCHAPv2" and "EAP-MD5". The '/' character is used as a separator between the outer and inner methods.
- // Dot1XMethods type
- type Dot1XMethods []string
- // CRLID type
- type CRLID NCName
- // CertPathValidationPolicyID type
- type CertPathValidationPolicyID NCName
- // A list of RSA key lenghts in bits.
- // RSAKeyLengths type
- type RSAKeyLengths []NonNegativeInteger
- // A list of X.509 versions.
- // X509Versions type
- type X509Versions []int32
- // A list of TLS versions.
- // TLSVersions type
- type TLSVersions []string
- // A list of password based encryption algorithms.
- // PasswordBasedEncryptionAlgorithms type
- type PasswordBasedEncryptionAlgorithms []string
- // A list of password based MAC algorithms.
- // PasswordBasedMACAlgorithms type
- type PasswordBasedMACAlgorithms []string
- // GetServiceCapabilities type
- type GetServiceCapabilities struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetServiceCapabilities"`
- }
- // GetServiceCapabilitiesResponse type
- type GetServiceCapabilitiesResponse struct {
- XMLName xml.Name `xml:"GetServiceCapabilitiesResponse"`
- // The capabilities for the security configuration service is returned in the Capabilities element.
- Capabilities Capabilities `xml:"Capabilities,omitempty"`
- }
- // CreateRSAKeyPair type
- type CreateRSAKeyPair struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CreateRSAKeyPair"`
- // The length of the key to be created.
- KeyLength NonNegativeInteger `xml:"http://www.onvif.org/ver10/schema KeyLength,omitempty"`
- // The client-defined alias of the key.
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- }
- // CreateRSAKeyPairResponse type
- type CreateRSAKeyPairResponse struct {
- XMLName xml.Name `xml:"CreateRSAKeyPairResponse"`
- // The key ID of the key pair being generated.
- KeyID KeyID `xml:"KeyID,omitempty"`
- // Best-effort estimate of how long the key generation will take.
- EstimatedCreationTime Duration `xml:"EstimatedCreationTime,omitempty"`
- }
- // UploadKeyPairInPKCS8 type
- type UploadKeyPairInPKCS8 struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl UploadKeyPairInPKCS8"`
- // The key pair to be uploaded in a PKCS#8 data structure.
- KeyPair Base64DERencodedASN1Value `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyPair,omitempty"`
- // The client-defined alias of the key pair.
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- // The ID of the passphrase to use for decrypting the uploaded key pair.
- EncryptionPassphraseID PassphraseID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl EncryptionPassphraseID,omitempty"`
- // The passphrase to use for decrypting the uploaded key pair.
- EncryptionPassphrase string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl EncryptionPassphrase,omitempty"`
- }
- // UploadKeyPairInPKCS8Response type
- type UploadKeyPairInPKCS8Response struct {
- XMLName xml.Name `xml:"UploadKeyPairInPKCS8Response"`
- // The key ID of the uploaded key pair.
- KeyID KeyID `xml:"KeyID,omitempty"`
- }
- // UploadCertificateWithPrivateKeyInPKCS12 type
- type UploadCertificateWithPrivateKeyInPKCS12 struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl UploadCertificateWithPrivateKeyInPKCS12"`
- // The certificates and key pair to be uploaded in a PKCS#12 data structure.
- CertWithPrivateKey Base64DERencodedASN1Value `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertWithPrivateKey,omitempty"`
- // The client-defined alias of the certification path.
- CertificationPathAlias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificationPathAlias,omitempty"`
- // The client-defined alias of the key pair.
- KeyAlias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyAlias,omitempty"`
- // True if and only if the device shall behave as if the client had only supplied the first certificate in the sequence of certificates.
- IgnoreAdditionalCertificates bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl IgnoreAdditionalCertificates,omitempty"`
- // The ID of the passphrase to use for integrity checking of the uploaded PKCS#12 data structure.
- IntegrityPassphraseID PassphraseID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl IntegrityPassphraseID,omitempty"`
- // The ID of the passphrase to use for decrypting the uploaded PKCS#12 data structure.
- EncryptionPassphraseID PassphraseID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl EncryptionPassphraseID,omitempty"`
- // The passphrase to use for integrity checking and decrypting the uploaded PKCS#12 data structure.
- Passphrase string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Passphrase,omitempty"`
- }
- // UploadCertificateWithPrivateKeyInPKCS12Response type
- type UploadCertificateWithPrivateKeyInPKCS12Response struct {
- XMLName xml.Name `xml:"UploadCertificateWithPrivateKeyInPKCS12Response"`
- // The certification path ID of the uploaded certification path.
- CertificationPathID CertificationPathID `xml:"CertificationPathID,omitempty"`
- // The key ID of the uploaded key pair.
- KeyID KeyID `xml:"KeyID,omitempty"`
- }
- // GetKeyStatus type
- type GetKeyStatus struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetKeyStatus"`
- // The ID of the key for which to return the status.
- KeyID KeyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyID,omitempty"`
- }
- // GetKeyStatusResponse type
- type GetKeyStatusResponse struct {
- XMLName xml.Name `xml:"GetKeyStatusResponse"`
- // Status of the requested key. The value should be one of the values in the tas:KeyStatus enumeration.
- KeyStatus string `xml:"KeyStatus,omitempty"`
- }
- // GetPrivateKeyStatus type
- type GetPrivateKeyStatus struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetPrivateKeyStatus"`
- // The ID of the key pair for which to return whether it contains a private key.
- KeyID KeyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyID,omitempty"`
- }
- // GetPrivateKeyStatusResponse type
- type GetPrivateKeyStatusResponse struct {
- XMLName xml.Name `xml:"GetPrivateKeyStatusResponse"`
- // True if and only if the key pair contains a private key.
- HasPrivateKey bool `xml:"hasPrivateKey,omitempty"`
- }
- // GetAllKeys type
- type GetAllKeys struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetAllKeys"`
- }
- // GetAllKeysResponse type
- type GetAllKeysResponse struct {
- XMLName xml.Name `xml:"GetAllKeysResponse"`
- // Information about a key in the keystore.
- KeyAttribute []KeyAttribute `xml:"KeyAttribute,omitempty"`
- }
- // DeleteKey type
- type DeleteKey struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl DeleteKey"`
- // The ID of the key that is to be deleted from the keystore.
- KeyID KeyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyID,omitempty"`
- }
- // DeleteKeyResponse type
- type DeleteKeyResponse struct {
- XMLName xml.Name `xml:"DeleteKeyResponse"`
- }
- // CreatePKCS10CSR type
- type CreatePKCS10CSR struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CreatePKCS10CSR"`
- // The subject to be included in the CSR.
- Subject DistinguishedName `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Subject,omitempty"`
- // The ID of the key for which the CSR shall be created.
- KeyID KeyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyID,omitempty"`
- // An attribute to be included in the CSR.
- CSRAttribute []CSRAttribute `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CSRAttribute,omitempty"`
- // The signature algorithm to be used to sign the CSR.
- SignatureAlgorithm AlgorithmIdentifier `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl SignatureAlgorithm,omitempty"`
- }
- // CreatePKCS10CSRResponse type
- type CreatePKCS10CSRResponse struct {
- XMLName xml.Name `xml:"CreatePKCS10CSRResponse"`
- // The DER encoded PKCS#10 certification request.
- PKCS10CSR Base64DERencodedASN1Value `xml:"PKCS10CSR,omitempty"`
- }
- // CreateSelfSignedCertificate type
- type CreateSelfSignedCertificate struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CreateSelfSignedCertificate"`
- // The X.509 version that the generated certificate shall comply to.
- X509Version PositiveInteger `xml:"http://www.onvif.org/ver10/pacs X509Version,omitempty"`
- // Distinguished name of the entity that the certificate shall belong to.
- Subject DistinguishedName `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Subject,omitempty"`
- // The ID of the key for which the certificate shall be created.
- KeyID KeyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyID,omitempty"`
- // The client-defined alias of the certificate to be created.
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- // The X.509 not valid before information to be included in the certificate. Defaults to the device's current time or a time before the device's current time.
- NotValidBefore string `xml:"notValidBefore,omitempty"`
- // The X.509 not valid after information to be included in the certificate. Defaults to the time 99991231235959Z as specified in RFC 5280.
- NotValidAfter string `xml:"notValidAfter,omitempty"`
- // The signature algorithm to be used for signing the certificate.
- SignatureAlgorithm AlgorithmIdentifier `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl SignatureAlgorithm,omitempty"`
- // An X.509v3 extension to be included in the certificate.
- Extension []X509v3Extension `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Extension,omitempty"`
- }
- // CreateSelfSignedCertificateResponse type
- type CreateSelfSignedCertificateResponse struct {
- XMLName xml.Name `xml:"CreateSelfSignedCertificateResponse"`
- // The ID of the generated certificate.
- CertificateID CertificateID `xml:"CertificateID,omitempty"`
- }
- // UploadCertificate type
- type UploadCertificate struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl UploadCertificate"`
- // The base64-encoded DER representation of the X.509 certificate to be uploaded.
- Certificate Base64DERencodedASN1Value `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Certificate,omitempty"`
- // The client-defined alias of the certificate.
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- // The client-defined alias of the key pair.
- KeyAlias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyAlias,omitempty"`
- // Indicates if the device shall verify that a matching key pair with a private key exists in the keystore.
- PrivateKeyRequired bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl PrivateKeyRequired,omitempty"`
- }
- // UploadCertificateResponse type
- type UploadCertificateResponse struct {
- XMLName xml.Name `xml:"UploadCertificateResponse"`
- // The ID of the uploaded certificate.
- CertificateID CertificateID `xml:"CertificateID,omitempty"`
- // The ID of the key that the uploaded certificate certifies.
- KeyID KeyID `xml:"KeyID,omitempty"`
- }
- // GetCertificate type
- type GetCertificate struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetCertificate"`
- // The ID of the certificate to retrieve.
- CertificateID CertificateID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificateID,omitempty"`
- }
- // GetCertificateResponse type
- type GetCertificateResponse struct {
- XMLName xml.Name `xml:"GetCertificateResponse"`
- // The DER representation of the certificate.
- Certificate X509Certificate `xml:"Certificate,omitempty"`
- }
- // GetAllCertificates type
- type GetAllCertificates struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetAllCertificates"`
- }
- // GetAllCertificatesResponse type
- type GetAllCertificatesResponse struct {
- XMLName xml.Name `xml:"GetAllCertificatesResponse"`
- // A certificate stored in the keystore.
- Certificate []X509Certificate `xml:"Certificate,omitempty"`
- }
- // DeleteCertificate type
- type DeleteCertificate struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl DeleteCertificate"`
- // The ID of the certificate to delete.
- CertificateID CertificateID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificateID,omitempty"`
- }
- // DeleteCertificateResponse type
- type DeleteCertificateResponse struct {
- XMLName xml.Name `xml:"DeleteCertificateResponse"`
- }
- // CreateCertificationPath type
- type CreateCertificationPath struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CreateCertificationPath"`
- // The IDs of the certificates to include in the certification path, where each certificate signature except for the last one in the path must be verifiable with the public key certified by the next certificate in the path.
- CertificateIDs CertificateIDs `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificateIDs,omitempty"`
- // The client-defined alias of the certification path.
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- }
- // CreateCertificationPathResponse type
- type CreateCertificationPathResponse struct {
- XMLName xml.Name `xml:"CreateCertificationPathResponse"`
- // The ID of the generated certification path.
- CertificationPathID CertificationPathID `xml:"CertificationPathID,omitempty"`
- }
- // GetCertificationPath type
- type GetCertificationPath struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetCertificationPath"`
- // The ID of the certification path to retrieve.
- CertificationPathID CertificationPathID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificationPathID,omitempty"`
- }
- // GetCertificationPathResponse type
- type GetCertificationPathResponse struct {
- XMLName xml.Name `xml:"GetCertificationPathResponse"`
- // The certification path that is stored under the given ID in the keystore.
- CertificationPath CertificationPath `xml:"CertificationPath,omitempty"`
- }
- // GetAllCertificationPaths type
- type GetAllCertificationPaths struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetAllCertificationPaths"`
- }
- // GetAllCertificationPathsResponse type
- type GetAllCertificationPathsResponse struct {
- XMLName xml.Name `xml:"GetAllCertificationPathsResponse"`
- // An ID of a certification path in the keystore.
- CertificationPathID []CertificationPathID `xml:"CertificationPathID,omitempty"`
- }
- // DeleteCertificationPath type
- type DeleteCertificationPath struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl DeleteCertificationPath"`
- // The ID of the certification path to delete.
- CertificationPathID CertificationPathID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificationPathID,omitempty"`
- }
- // DeleteCertificationPathResponse type
- type DeleteCertificationPathResponse struct {
- XMLName xml.Name `xml:"DeleteCertificationPathResponse"`
- }
- // UploadPassphrase type
- type UploadPassphrase struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl UploadPassphrase"`
- // The passphrase to upload.
- Passphrase string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Passphrase,omitempty"`
- // The alias for the passphrase to upload.
- PassphraseAlias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl PassphraseAlias,omitempty"`
- }
- // UploadPassphraseResponse type
- type UploadPassphraseResponse struct {
- XMLName xml.Name `xml:"UploadPassphraseResponse"`
- // The PassphraseID of the uploaded passphrase.
- PassphraseID PassphraseID `xml:"PassphraseID,omitempty"`
- }
- // GetAllPassphrases type
- type GetAllPassphrases struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetAllPassphrases"`
- }
- // GetAllPassphrasesResponse type
- type GetAllPassphrasesResponse struct {
- XMLName xml.Name `xml:"GetAllPassphrasesResponse"`
- // Information about a passphrase in the keystore.
- PassphraseAttribute []PassphraseAttribute `xml:"PassphraseAttribute,omitempty"`
- }
- // DeletePassphrase type
- type DeletePassphrase struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl DeletePassphrase"`
- // The ID of the passphrase that is to be deleted from the keystore.
- PassphraseID PassphraseID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl PassphraseID,omitempty"`
- }
- // DeletePassphraseResponse type
- type DeletePassphraseResponse struct {
- XMLName xml.Name `xml:"DeletePassphraseResponse"`
- }
- // AddServerCertificateAssignment type
- type AddServerCertificateAssignment struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl AddServerCertificateAssignment"`
- CertificationPathID CertificationPathID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificationPathID,omitempty"`
- }
- // AddServerCertificateAssignmentResponse type
- type AddServerCertificateAssignmentResponse struct {
- XMLName xml.Name `xml:"AddServerCertificateAssignmentResponse"`
- }
- // RemoveServerCertificateAssignment type
- type RemoveServerCertificateAssignment struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl RemoveServerCertificateAssignment"`
- CertificationPathID CertificationPathID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificationPathID,omitempty"`
- }
- // RemoveServerCertificateAssignmentResponse type
- type RemoveServerCertificateAssignmentResponse struct {
- XMLName xml.Name `xml:"RemoveServerCertificateAssignmentResponse"`
- }
- // ReplaceServerCertificateAssignment type
- type ReplaceServerCertificateAssignment struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl ReplaceServerCertificateAssignment"`
- OldCertificationPathID CertificationPathID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl OldCertificationPathID,omitempty"`
- NewCertificationPathID CertificationPathID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl NewCertificationPathID,omitempty"`
- }
- // ReplaceServerCertificateAssignmentResponse type
- type ReplaceServerCertificateAssignmentResponse struct {
- XMLName xml.Name `xml:"ReplaceServerCertificateAssignmentResponse"`
- }
- // GetAssignedServerCertificates type
- type GetAssignedServerCertificates struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetAssignedServerCertificates"`
- }
- // GetAssignedServerCertificatesResponse type
- type GetAssignedServerCertificatesResponse struct {
- XMLName xml.Name `xml:"GetAssignedServerCertificatesResponse"`
- // The IDs of all certification paths that are assigned to the TLS server on the device.
- CertificationPathID []CertificationPathID `xml:"CertificationPathID,omitempty"`
- }
- // SetEnabledTLSVersions type
- type SetEnabledTLSVersions struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl SetEnabledTLSVersions"`
- // List of TLS versions to allow.
- Versions TLSVersions `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Versions,omitempty"`
- }
- // SetEnabledTLSVersionsResponse type
- type SetEnabledTLSVersionsResponse struct {
- XMLName xml.Name `xml:"SetEnabledTLSVersionsResponse"`
- }
- // GetEnabledTLSVersions type
- type GetEnabledTLSVersions struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetEnabledTLSVersions"`
- }
- // GetEnabledTLSVersionsResponse type
- type GetEnabledTLSVersionsResponse struct {
- XMLName xml.Name `xml:"GetEnabledTLSVersionsResponse"`
- // List of allowed TLS versions.
- Versions TLSVersions `xml:"Versions,omitempty"`
- }
- // UploadCRL type
- type UploadCRL struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl UploadCRL"`
- //
- // The CRL to be uploaded to the device.
- //
- Crl Base64DERencodedASN1Value `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Crl,omitempty"`
- //
- // The alias to assign to the uploaded CRL.
- //
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- AnyParameters struct {
- } `xml:"anyParameters,omitempty"`
- }
- // UploadCRLResponse type
- type UploadCRLResponse struct {
- XMLName xml.Name `xml:"UploadCRLResponse"`
- //
- // The ID of the uploaded CRL.
- //
- CrlID CRLID `xml:"CrlID,omitempty"`
- }
- // GetCRL type
- type GetCRL struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetCRL"`
- //
- // The ID of the CRL to be returned.
- //
- CrlID CRLID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CrlID,omitempty"`
- }
- // GetCRLResponse type
- type GetCRLResponse struct {
- XMLName xml.Name `xml:"GetCRLResponse"`
- //
- // The CRL with the requested ID.
- //
- Crl CRL `xml:"Crl,omitempty"`
- }
- // GetAllCRLs type
- type GetAllCRLs struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetAllCRLs"`
- }
- // GetAllCRLsResponse type
- type GetAllCRLsResponse struct {
- XMLName xml.Name `xml:"GetAllCRLsResponse"`
- //
- // A list of all CRLs that are stored in the keystore on the device.
- //
- Crl []CRL `xml:"Crl,omitempty"`
- }
- // DeleteCRL type
- type DeleteCRL struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl DeleteCRL"`
- //
- // The ID of the CRL to be deleted.
- //
- CrlID CRLID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CrlID,omitempty"`
- }
- // DeleteCRLResponse type
- type DeleteCRLResponse struct {
- XMLName xml.Name `xml:"DeleteCRLResponse"`
- }
- // CreateCertPathValidationPolicy type
- type CreateCertPathValidationPolicy struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CreateCertPathValidationPolicy"`
- //
- // The alias to assign to the created certification path validation policy.
- //
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- //
- // The parameters of the certification path validation policy to be created.
- //
- Parameters CertPathValidationParameters `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Parameters,omitempty"`
- //
- // The trust anchors of the certification path validation policy to be created.
- //
- TrustAnchor []TrustAnchor `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl TrustAnchor,omitempty"`
- AnyParameters struct {
- } `xml:"anyParameters,omitempty"`
- }
- // CreateCertPathValidationPolicyResponse type
- type CreateCertPathValidationPolicyResponse struct {
- XMLName xml.Name `xml:"CreateCertPathValidationPolicyResponse"`
- //
- // The ID of the created certification path validation policy.
- //
- CertPathValidationPolicyID CertPathValidationPolicyID `xml:"CertPathValidationPolicyID,omitempty"`
- }
- // GetCertPathValidationPolicy type
- type GetCertPathValidationPolicy struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetCertPathValidationPolicy"`
- //
- // The ID of the certification path validation policy to be created.
- //
- CertPathValidationPolicyID CertPathValidationPolicyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertPathValidationPolicyID,omitempty"`
- }
- // GetCertPathValidationPolicyResponse type
- type GetCertPathValidationPolicyResponse struct {
- XMLName xml.Name `xml:"GetCertPathValidationPolicyResponse"`
- //
- // The certification path validation policy that is stored under the requested ID.
- //
- CertPathValidationPolicy CertPathValidationPolicy `xml:"CertPathValidationPolicy,omitempty"`
- }
- // GetAllCertPathValidationPolicies type
- type GetAllCertPathValidationPolicies struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetAllCertPathValidationPolicies"`
- }
- // GetAllCertPathValidationPoliciesResponse type
- type GetAllCertPathValidationPoliciesResponse struct {
- XMLName xml.Name `xml:"GetAllCertPathValidationPoliciesResponse"`
- //
- // A list of all certification path validation policies that are stored in the keystore on the device.
- //
- CertPathValidationPolicy []CertPathValidationPolicy `xml:"CertPathValidationPolicy,omitempty"`
- }
- // DeleteCertPathValidationPolicy type
- type DeleteCertPathValidationPolicy struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl DeleteCertPathValidationPolicy"`
- //
- // The ID of the certification path validation policy to be deleted.
- //
- CertPathValidationPolicyID CertPathValidationPolicyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertPathValidationPolicyID,omitempty"`
- }
- // DeleteCertPathValidationPolicyResponse type
- type DeleteCertPathValidationPolicyResponse struct {
- XMLName xml.Name `xml:"DeleteCertPathValidationPolicyResponse"`
- }
- // SetClientAuthenticationRequired type
- type SetClientAuthenticationRequired struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl SetClientAuthenticationRequired"`
- ClientAuthenticationRequired bool `xml:"clientAuthenticationRequired,omitempty"`
- }
- // SetClientAuthenticationRequiredResponse type
- type SetClientAuthenticationRequiredResponse struct {
- XMLName xml.Name `xml:"SetClientAuthenticationRequiredResponse"`
- }
- // GetClientAuthenticationRequired type
- type GetClientAuthenticationRequired struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetClientAuthenticationRequired"`
- }
- // GetClientAuthenticationRequiredResponse type
- type GetClientAuthenticationRequiredResponse struct {
- XMLName xml.Name `xml:"GetClientAuthenticationRequiredResponse"`
- ClientAuthenticationRequired bool `xml:"clientAuthenticationRequired,omitempty"`
- }
- // AddCertPathValidationPolicyAssignment type
- type AddCertPathValidationPolicyAssignment struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl AddCertPathValidationPolicyAssignment"`
- //
- // The ID of the certification path validation policy to assign to the TLS server.
- //
- CertPathValidationPolicyID CertPathValidationPolicyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertPathValidationPolicyID,omitempty"`
- }
- // AddCertPathValidationPolicyAssignmentResponse type
- type AddCertPathValidationPolicyAssignmentResponse struct {
- XMLName xml.Name `xml:"AddCertPathValidationPolicyAssignmentResponse"`
- }
- // RemoveCertPathValidationPolicyAssignment type
- type RemoveCertPathValidationPolicyAssignment struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl RemoveCertPathValidationPolicyAssignment"`
- //
- // The ID of the certification path validation policy to de-assign from the TLS server.
- //
- CertPathValidationPolicyID CertPathValidationPolicyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertPathValidationPolicyID,omitempty"`
- }
- // RemoveCertPathValidationPolicyAssignmentResponse type
- type RemoveCertPathValidationPolicyAssignmentResponse struct {
- XMLName xml.Name `xml:"RemoveCertPathValidationPolicyAssignmentResponse"`
- }
- // ReplaceCertPathValidationPolicyAssignment type
- type ReplaceCertPathValidationPolicyAssignment struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl ReplaceCertPathValidationPolicyAssignment"`
- //
- // The ID of the certification path validation policy to be de-assigned from the TLS server.
- //
- OldCertPathValidationPolicyID CertPathValidationPolicyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl OldCertPathValidationPolicyID,omitempty"`
- //
- // The ID of the certification path validation policy to assign to the TLS server.
- //
- NewCertPathValidationPolicyID CertPathValidationPolicyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl NewCertPathValidationPolicyID,omitempty"`
- }
- // ReplaceCertPathValidationPolicyAssignmentResponse type
- type ReplaceCertPathValidationPolicyAssignmentResponse struct {
- XMLName xml.Name `xml:"ReplaceCertPathValidationPolicyAssignmentResponse"`
- }
- // GetAssignedCertPathValidationPolicies type
- type GetAssignedCertPathValidationPolicies struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetAssignedCertPathValidationPolicies"`
- }
- // GetAssignedCertPathValidationPoliciesResponse type
- type GetAssignedCertPathValidationPoliciesResponse struct {
- XMLName xml.Name `xml:"GetAssignedCertPathValidationPoliciesResponse"`
- //
- // A list of IDs of the certification path validation policies that are assigned to the TLS server.
- //
- CertPathValidationPolicyID []CertPathValidationPolicyID `xml:"CertPathValidationPolicyID,omitempty"`
- }
- // AddDot1XConfiguration type
- type AddDot1XConfiguration struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl AddDot1XConfiguration"`
- // The desired 802.1X configuration.
- Dot1XConfiguration Dot1XConfiguration `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Dot1XConfiguration,omitempty"`
- }
- // AddDot1XConfigurationResponse type
- type AddDot1XConfigurationResponse struct {
- XMLName xml.Name `xml:"AddDot1XConfigurationResponse"`
- // The unique identifier of the created 802.1X configuration.
- Dot1XID Dot1XID `xml:"Dot1XID,omitempty"`
- }
- // GetAllDot1XConfigurations type
- type GetAllDot1XConfigurations struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetAllDot1XConfigurations"`
- }
- // GetAllDot1XConfigurationsResponse type
- type GetAllDot1XConfigurationsResponse struct {
- XMLName xml.Name `xml:"GetAllDot1XConfigurationsResponse"`
- // The list of unique identifiers of 802.1X configurations on the device.
- Configuration []Dot1XConfiguration `xml:"Configuration,omitempty"`
- }
- // GetDot1XConfiguration type
- type GetDot1XConfiguration struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetDot1XConfiguration"`
- // The unique identifier of the desired 802.1X configuration.
- Dot1XID Dot1XID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Dot1XID,omitempty"`
- }
- // GetDot1XConfigurationResponse type
- type GetDot1XConfigurationResponse struct {
- XMLName xml.Name `xml:"GetDot1XConfigurationResponse"`
- // The 802.1X configuration, without password information.
- Dot1XConfiguration Dot1XConfiguration `xml:"Dot1XConfiguration,omitempty"`
- }
- // DeleteDot1XConfiguration type
- type DeleteDot1XConfiguration struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl DeleteDot1XConfiguration"`
- // The unique identifier of the 802.1X configuration to be deleted.
- Dot1XID Dot1XID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Dot1XID,omitempty"`
- }
- // DeleteDot1XConfigurationResponse type
- type DeleteDot1XConfigurationResponse struct {
- XMLName xml.Name `xml:"DeleteDot1XConfigurationResponse"`
- }
- // SetNetworkInterfaceDot1XConfiguration type
- type SetNetworkInterfaceDot1XConfiguration struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl SetNetworkInterfaceDot1XConfiguration"`
- // The unique identifier of the Network Interface on which the 802.1X configuration is to be set. (NOTE: the network interface token is defined in devicemgmt.wsdl as tt:ReferenceToken, which is a derived type of xs:string. To avoid importing all of common.xsd for this single type, the base type is used here.)
- Token string `xml:"token,omitempty"`
- // The unique identifier of the 802.1X configuration to be set.
- Dot1XID Dot1XID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Dot1XID,omitempty"`
- }
- // SetNetworkInterfaceDot1XConfigurationResponse type
- type SetNetworkInterfaceDot1XConfigurationResponse struct {
- XMLName xml.Name `xml:"SetNetworkInterfaceDot1XConfigurationResponse"`
- // Indicates whether or not a reboot is required after configuration updates.
- RebootNeeded bool `xml:"RebootNeeded,omitempty"`
- }
- // GetNetworkInterfaceDot1XConfiguration type
- type GetNetworkInterfaceDot1XConfiguration struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GetNetworkInterfaceDot1XConfiguration"`
- // The unique identifier of the Network Interface for which the 802.1X configuration is to be retrieved. (NOTE: the network interface token is defined in devicemgmt.wsdl as tt:ReferenceToken, which is a derived type of xs:string. To avoid importing all of common.xsd for this single type, the base type is used here.)
- Token string `xml:"token,omitempty"`
- }
- // GetNetworkInterfaceDot1XConfigurationResponse type
- type GetNetworkInterfaceDot1XConfigurationResponse struct {
- XMLName xml.Name `xml:"GetNetworkInterfaceDot1XConfigurationResponse"`
- // The unique identifier of 802.1X configuration assigned to the Network Interface.
- Dot1XID Dot1XID `xml:"Dot1XID,omitempty"`
- }
- // DeleteNetworkInterfaceDot1XConfiguration type
- type DeleteNetworkInterfaceDot1XConfiguration struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl DeleteNetworkInterfaceDot1XConfiguration"`
- // The unique identifier of the Network Interface for which the 802.1X configuration is to be deleted. (NOTE: the network interface token is defined in devicemgmt.wsdl as tt:ReferenceToken, which is a derived type of xs:string. To avoid importing all of common.xsd for this single type, the base type is used here.)
- Token string `xml:"token,omitempty"`
- }
- // DeleteNetworkInterfaceDot1XConfigurationResponse type
- type DeleteNetworkInterfaceDot1XConfigurationResponse struct {
- XMLName xml.Name `xml:"DeleteNetworkInterfaceDot1XConfigurationResponse"`
- // Indicates whether or not a reboot is required after configuration updates.
- RebootNeeded bool `xml:"RebootNeeded,omitempty"`
- }
- // KeyAttribute type
- type KeyAttribute struct {
- // The ID of the key.
- KeyID KeyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyID,omitempty"`
- // The client-defined alias of the key.
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- // Absent if the key is not a key pair. True if and only if the key is a key pair and contains a private key. False if and only if the key is a key pair and does not contain a private key.
- HasPrivateKey bool `xml:"hasPrivateKey,omitempty"`
- // The status of the key. The value should be one of the values in the tas:KeyStatus enumeration.
- KeyStatus string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyStatus,omitempty"`
- // True if and only if the key was generated outside the device.
- ExternallyGenerated bool `xml:"externallyGenerated,omitempty"`
- // True if and only if the key is stored in a specially protected hardware component inside the device.
- SecurelyStored bool `xml:"securelyStored,omitempty"`
- Extension struct {
- } `xml:"Extension,omitempty"`
- }
- // DNAttributeTypeAndValue type
- type DNAttributeTypeAndValue struct {
- // The attribute type.
- Type DNAttributeType `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Type,omitempty"`
- // The value of the attribute.
- Value DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Value,omitempty"`
- }
- // MultiValuedRDN type
- type MultiValuedRDN struct {
- // A list of types and values defining a multi-valued RDN
- Attribute []DNAttributeTypeAndValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Attribute,omitempty"`
- }
- // DistinguishedName type
- type DistinguishedName struct {
- // A country name as specified in
- // X.500.
- Country []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Country,omitempty"`
- // An organization name as specified in
- // X.500.
- Organization []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Organization,omitempty"`
- // An organizational unit name as specified in
- // X.500.
- OrganizationalUnit []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl OrganizationalUnit,omitempty"`
- // A distinguished name qualifier as specified in
- // X.500.
- DistinguishedNameQualifier []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl DistinguishedNameQualifier,omitempty"`
- // A state or province name as specified in
- // X.500.
- StateOrProvinceName []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl StateOrProvinceName,omitempty"`
- // A common name as specified in
- // X.500.
- CommonName []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CommonName,omitempty"`
- // A serial number as specified in
- // X.500.
- SerialNumber []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl SerialNumber,omitempty"`
- // A locality as specified in X.500.
- Locality []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Locality,omitempty"`
- // A title as specified in X.500.
- Title []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Title,omitempty"`
- // A surname as specified in X.500.
- Surname []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Surname,omitempty"`
- // A given name as specified in X.500.
- GivenName []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GivenName,omitempty"`
- // Initials as specified in X.500.
- Initials []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Initials,omitempty"`
- // A pseudonym as specified in X.500.
- Pseudonym []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Pseudonym,omitempty"`
- // A generation qualifier as specified in
- // X.500.
- GenerationQualifier []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GenerationQualifier,omitempty"`
- // A generic type-value pair
- // attribute.
- GenericAttribute []DNAttributeTypeAndValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl GenericAttribute,omitempty"`
- // A multi-valued RDN
- MultiValuedRDN []MultiValuedRDN `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl MultiValuedRDN,omitempty"`
- AnyAttribute struct {
- // Domain Component as specified in RFC3739
- DomainComponent []DNAttributeValue `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl DomainComponent,omitempty"`
- } `xml:"anyAttribute,omitempty"`
- }
- // AlgorithmIdentifier type
- type AlgorithmIdentifier struct {
- // The OID of the algorithm in dot-decimal form.
- Algorithm DotDecimalOID `xml:"algorithm,omitempty"`
- // Optional parameters of the algorithm (depending on the algorithm).
- Parameters Base64DERencodedASN1Value `xml:"parameters,omitempty"`
- AnyParameters struct {
- } `xml:"anyParameters,omitempty"`
- }
- // BasicRequestAttribute type
- type BasicRequestAttribute struct {
- // The OID of the attribute.
- OID DotDecimalOID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl OID,omitempty"`
- // The value of the attribute as a base64-encoded DER representation of an ASN.1 value.
- Value Base64DERencodedASN1Value `xml:"value,omitempty"`
- }
- // CSRAttribute type
- type CSRAttribute struct {
- // An X.509v3 extension field.
- X509v3Extension X509v3Extension `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl X509v3Extension,omitempty"`
- // A basic CSR attribute.
- BasicRequestAttribute BasicRequestAttribute `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl BasicRequestAttribute,omitempty"`
- AnyAttribute struct {
- } `xml:"anyAttribute,omitempty"`
- }
- // X509v3Extension type
- type X509v3Extension struct {
- // The OID of the extension field.
- ExtnOID DotDecimalOID `xml:"extnOID,omitempty"`
- // True if and only if the extension is critical.
- Critical bool `xml:"critical,omitempty"`
- // The value of the extension field as a base64-encoded DER representation of an ASN.1 value.
- ExtnValue Base64DERencodedASN1Value `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl extnValue,omitempty"`
- }
- // X509Certificate type
- type X509Certificate struct {
- // The ID of the certificate.
- CertificateID CertificateID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificateID,omitempty"`
- // The ID of the key that this certificate associates to the certificate subject.
- KeyID KeyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeyID,omitempty"`
- // The client-defined alias of the certificate.
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- // The base64-encoded DER representation of the X.509 certificate.
- CertificateContent Base64DERencodedASN1Value `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificateContent,omitempty"`
- }
- // CertificateIDs type
- type CertificateIDs struct {
- // A certificate ID.
- CertificateID []CertificateID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificateID,omitempty"`
- }
- // CertificationPath type
- type CertificationPath struct {
- // A certificate in the certification path.
- CertificateID []CertificateID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificateID,omitempty"`
- // The client-defined alias of the certification path.
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- AnyElement struct {
- } `xml:"anyElement,omitempty"`
- }
- // PassphraseAttribute type
- type PassphraseAttribute struct {
- // The ID of the passphrase.
- PassphraseID PassphraseID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl PassphraseID,omitempty"`
- // The alias of the passphrase.
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- }
- // Dot1XCapabilities type
- type Dot1XCapabilities struct {
- // The maximum number of 802.1X configurations that may be defined simultaneously.
- MaximumNumberOfDot1XConfigurations PositiveInteger `xml:"http://www.onvif.org/ver10/pacs MaximumNumberOfDot1XConfigurations,attr,omitempty"`
- // The authentication methods supported by the 802.1X implementation.
- Dot1XMethods Dot1XMethods `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Dot1XMethods,attr,omitempty"`
- }
- // Dot1XStage type
- type Dot1XStage struct {
- // The identity used in this authentication method, if required.
- Identity string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Identity,omitempty"`
- // The unique identifier of the certification path used in this authentication method, if required.
- CertificationPathID CertificationPathID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificationPathID,omitempty"`
- // The identifier for the password used in this authentication method, if required. If Identity is used as an anonymous identity for this authentication method, PassphraseID is ignored.
- PassphraseID PassphraseID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl PassphraseID,omitempty"`
- // The configuration of the next stage of authentication, if required.
- Inner *Dot1XStage `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Inner,omitempty"`
- Extension Dot1XStageExtension `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Extension,omitempty"`
- // The authentication method for this stage (e.g., "EAP-PEAP").
- Method string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Method,attr,omitempty"`
- }
- // Dot1XStageExtension type
- type Dot1XStageExtension struct {
- }
- // Dot1XConfiguration type
- type Dot1XConfiguration struct {
- // The unique identifier of the IEEE 802.1X configuration.
- Dot1XID Dot1XID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Dot1XID,omitempty"`
- // The client-defined alias of the 802.1X configuration.
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- // The outer level authentication method used in this 802.1X configuration.
- Outer Dot1XStage `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Outer,omitempty"`
- }
- // CRL type
- type CRL struct {
- CRLID CRLID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CRLID,omitempty"`
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- CRLContent Base64DERencodedASN1Value `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CRLContent,omitempty"`
- }
- // CertPathValidationParameters type
- type CertPathValidationParameters struct {
- // True if and only if the TLS server shall not authenticate client certificates that do not contain the TLS WWW client authentication key usage extension as specified in RFC 5280, Sect. 4.2.1.12.
- RequireTLSWWWClientAuthExtendedKeyUsage bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl RequireTLSWWWClientAuthExtendedKeyUsage,omitempty"`
- // True if and only if delta CRLs, if available, shall be applied to CRLs.
- UseDeltaCRLs bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl UseDeltaCRLs,omitempty"`
- AnyParameters struct {
- } `xml:"anyParameters,omitempty"`
- }
- // TrustAnchor type
- type TrustAnchor struct {
- // The certificate ID of the certificate to be used as trust anchor.
- CertificateID CertificateID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertificateID,omitempty"`
- }
- // CertPathValidationPolicy type
- type CertPathValidationPolicy struct {
- CertPathValidationPolicyID CertPathValidationPolicyID `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl CertPathValidationPolicyID,omitempty"`
- Alias string `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Alias,omitempty"`
- Parameters CertPathValidationParameters `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Parameters,omitempty"`
- TrustAnchor []TrustAnchor `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl TrustAnchor,omitempty"`
- AnyParameters struct {
- } `xml:"anyParameters,omitempty"`
- }
- // KeystoreCapabilities type
- type KeystoreCapabilities struct {
- // The signature algorithms supported by the keystore implementation.
- SignatureAlgorithms []AlgorithmIdentifier `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl SignatureAlgorithms,omitempty"`
- AnyElement struct {
- } `xml:"anyElement,omitempty"`
- // Indicates the maximum number of keys that the device can store simultaneously.
- MaximumNumberOfKeys PositiveInteger `xml:"http://www.onvif.org/ver10/pacs MaximumNumberOfKeys,attr,omitempty"`
- // Indicates the maximum number of certificates that the device can store simultaneously.
- MaximumNumberOfCertificates PositiveInteger `xml:"http://www.onvif.org/ver10/pacs MaximumNumberOfCertificates,attr,omitempty"`
- // Indicates the maximum number of certification paths that the device can store simultaneously.
- MaximumNumberOfCertificationPaths PositiveInteger `xml:"http://www.onvif.org/ver10/pacs MaximumNumberOfCertificationPaths,attr,omitempty"`
- // Indication that the device supports on-board RSA key pair generation.
- RSAKeyPairGeneration bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl RSAKeyPairGeneration,attr,omitempty"`
- // Indicates which RSA key lengths are supported by the device.
- RSAKeyLengths RSAKeyLengths `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl RSAKeyLengths,attr,omitempty"`
- // Indicates support for creating PKCS#10 requests for RSA keys and uploading the certificate obtained from a CA..
- PKCS10ExternalCertificationWithRSA bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl PKCS10ExternalCertificationWithRSA,attr,omitempty"`
- // Indicates support for creating self-signed certificates for RSA keys.
- SelfSignedCertificateCreationWithRSA bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl SelfSignedCertificateCreationWithRSA,attr,omitempty"`
- // Indicates which X.509 versions are supported by the device.
- X509Versions X509Versions `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl X509Versions,attr,omitempty"`
- // Indicates the maximum number of passphrases that the device is able to store simultaneously.
- MaximumNumberOfPassphrases NonNegativeInteger `xml:"http://www.onvif.org/ver10/schema MaximumNumberOfPassphrases,attr,omitempty"`
- // Indicates support for uploading an RSA key pair in a PKCS#8 data structure.
- PKCS8RSAKeyPairUpload bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl PKCS8RSAKeyPairUpload,attr,omitempty"`
- // Indicates support for uploading a certificate along with an RSA private key in a PKCS#12 data structure.
- PKCS12CertificateWithRSAPrivateKeyUpload bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl PKCS12CertificateWithRSAPrivateKeyUpload,attr,omitempty"`
- // Indicates which password-based encryption algorithms are supported by the device.
- PasswordBasedEncryptionAlgorithms PasswordBasedEncryptionAlgorithms `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl PasswordBasedEncryptionAlgorithms,attr,omitempty"`
- // Indicates which password-based MAC algorithms are supported by the device.
- PasswordBasedMACAlgorithms PasswordBasedMACAlgorithms `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl PasswordBasedMACAlgorithms,attr,omitempty"`
- // Indicates the maximum number of CRLs that the device is able to store simultaneously.
- MaximumNumberOfCRLs NonNegativeInteger `xml:"http://www.onvif.org/ver10/schema MaximumNumberOfCRLs,attr,omitempty"`
- // Indicates the maximum number of certification path validation policies that the device is able to store simultaneously.
- MaximumNumberOfCertificationPathValidationPolicies NonNegativeInteger `xml:"http://www.onvif.org/ver10/schema MaximumNumberOfCertificationPathValidationPolicies,attr,omitempty"`
- // Indicates whether a device supports checking for the TLS WWW client auth extended key usage extension while validating certification paths.
- EnforceTLSWebClientAuthExtKeyUsage bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl EnforceTLSWebClientAuthExtKeyUsage,attr,omitempty"`
- // Indicates the device requires that each certificate with private key has its own unique key.
- NoPrivateKeySharing bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl NoPrivateKeySharing,attr,omitempty"`
- }
- // TLSServerCapabilities type
- type TLSServerCapabilities struct {
- // Indicates which TLS versions are supported by the device.
- TLSServerSupported TLSVersions `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl TLSServerSupported,attr,omitempty"`
- // Indicates whether the device supports enabling and disabling specific TLS versions.
- EnabledVersionsSupported bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl EnabledVersionsSupported,attr,omitempty"`
- // Indicates the maximum number of certification paths that may be assigned to the TLS server simultaneously.
- MaximumNumberOfTLSCertificationPaths PositiveInteger `xml:"http://www.onvif.org/ver10/pacs MaximumNumberOfTLSCertificationPaths,attr,omitempty"`
- // Indicates whether the device supports TLS client authentication.
- TLSClientAuthSupported bool `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl TLSClientAuthSupported,attr,omitempty"`
- // Indicates the maximum number of certification path validation policies that may be assigned to the TLS server simultaneously.
- MaximumNumberOfTLSCertificationPathValidationPolicies NonNegativeInteger `xml:"http://www.onvif.org/ver10/schema MaximumNumberOfTLSCertificationPathValidationPolicies,attr,omitempty"`
- }
- // Capabilities type
- type Capabilities struct {
- // The capabilities of the keystore implementation.
- KeystoreCapabilities KeystoreCapabilities `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl KeystoreCapabilities,omitempty"`
- // The capabilities of the TLS server implementation.
- TLSServerCapabilities TLSServerCapabilities `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl TLSServerCapabilities,omitempty"`
- // The capabilities of the 802.1X implementation.
- Dot1XCapabilities Dot1XCapabilities `xml:"http://www.onvif.org/ver10/advancedsecurity/wsdl Dot1XCapabilities,omitempty"`
- }
- // AdvancedSecurityService type
- type AdvancedSecurityService interface {
- /* Returns the capabilities of the security configuraiton service. The result is returned in a typed answer. */
- GetServiceCapabilities(request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error)
- GetServiceCapabilitiesContext(ctx context.Context, request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error)
- }
- // advancedSecurityService type
- type advancedSecurityService struct {
- client *soap.Client
- xaddr string
- }
- func NewAdvancedSecurityService(client *soap.Client, xaddr string) AdvancedSecurityService {
- return &advancedSecurityService{
- client: client,
- xaddr: xaddr,
- }
- }
- func (service *advancedSecurityService) GetServiceCapabilitiesContext(ctx context.Context, request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error) {
- response := new(GetServiceCapabilitiesResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetServiceCapabilities", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *advancedSecurityService) GetServiceCapabilities(request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error) {
- return service.GetServiceCapabilitiesContext(
- context.Background(),
- request,
- )
- }
- // Keystore type
- type Keystore interface {
- /*
- This operation triggers the asynchronous generation of an RSA key pair of a particular key length (specified as the number of bits) as specified in [RFC 3447], with a suitable key generation mechanism on the device.
- Keys, especially RSA key pairs, are uniquely identified using key IDs.
- If the device does not have not enough storage capacity for storing the key pair to be created, the maximum number of keys reached fault shall be produced and no key pair shall be generated.
- Otherwise, the operation generates a keyID for the new key and associates the generating status to it.
- Immediately after key generation has started, the device shall return the keyID to the client and continue to generate the key pair.
- The client may query the device with the GetKeyStatus operation whether the generation has finished.
- The client may also subscribe to Key Status events to be notified about key status changes.
- The device also returns a best-effort estimate of how much time it requires to create the key pair.
- A client may use this information as an indication how long to wait before querying the device whether key generation is completed.
- After the key has been successfully created, the device shall assign it the ok status. If the key generation fails, the device shall assign the key the corrupt status.
- */
- CreateRSAKeyPair(request *CreateRSAKeyPair) (*CreateRSAKeyPairResponse, error)
- CreateRSAKeyPairContext(ctx context.Context, request *CreateRSAKeyPair) (*CreateRSAKeyPairResponse, error)
- /*
- This operation uploads a key pair in a PKCS#8 data structure as specified in [RFC 5958, RFC 5959].
- If an encryption passphrase ID is supplied in the request, the device shall assume that the KeyPair parameter contains an EncryptedPrivateKeyInfo ASN.1
- structure that is encrypted under the passphrase in the keystore that corresponds to the supplied ID, where the EncryptedPrivateKeyInfo structure contains
- both the private key and the corresponding public key. If no encryption passphrase ID is supplied, the device shall assume that the KeyPair parameter contains a
- OneAsymmetricKey ASN.1 structure which contains both the private key and the corresponding public key.
- */
- UploadKeyPairInPKCS8(request *UploadKeyPairInPKCS8) (*UploadKeyPairInPKCS8Response, error)
- UploadKeyPairInPKCS8Context(ctx context.Context, request *UploadKeyPairInPKCS8) (*UploadKeyPairInPKCS8Response, error)
- /*
- This operation uploads a certification path consisting of X.509 certificates as specified by [RFC 5280] in DER encoding along with a private key to a device’s keystore.
- Certificates and private key are supplied in the form of a PKCS#12 file as specified in [PKCS#12].
- The device shall support PKCS#12 files that contain the following safe bags:
- * one or more instances of CertBag [PKCS#12, Sect. 4.2.3]
- * either exactly one instance of KeyBag [PKCS#12, Sect. 4.3.1] or exactly one instance of PKCS8ShroudedKeyBag [PKCS#12, Sect. 4.2.2].
- If the IgnoreAdditionalCertificates parameter has the value true, the device shall behave as if the client had supplied only the first CertBag in the sequence of CertBag instances.
- The device shall support PKCS#12 passphrase integrity mode for integrity protection of the PKCS#12 PFX as specified in [PKCS#12, Sect. 4].
- The device shall support PKCS8ShroudedKeyBags that are encrypted with the same passphrase as the CertBag instances.
- If an integrity passphrase ID is supplied, the device shall use the corresponding passphrase in the keystore to check the integrity of the supplied PKCS#12 PFX.
- If an integrity passphrase ID is supplied, but the supplied PKCS#12 PFX has no integrity protection, the device shall produce a BadPKCS12File fault and shall
- not store the uploaded certificates nor the uploaded key pair in the keystore.
- If an encryption passphrase ID is supplied, the device shall use the corresponding passphrase in the keystore to decrypt the PKCS8ShroudedKeyBag and the CertBag instances.
- If an EncryptionPassphraseID is supplied, but a CertBag is not encrypted, the device shall ignore the supplied EncryptionPassphraseID when processing this CertBag.
- If an EncryptionPassphraseID is supplied, but a KeyBag is provided instead of a PKCS8ShroudedKeyBag, the device shall ignore the supplied EncryptionPassphraseID when processing the KeyBag.
- */
- UploadCertificateWithPrivateKeyInPKCS12(request *UploadCertificateWithPrivateKeyInPKCS12) (*UploadCertificateWithPrivateKeyInPKCS12Response, error)
- UploadCertificateWithPrivateKeyInPKCS12Context(ctx context.Context, request *UploadCertificateWithPrivateKeyInPKCS12) (*UploadCertificateWithPrivateKeyInPKCS12Response, error)
- /*
- This operation returns the status of a key.
- Keys are uniquely identified using key IDs. If no key is stored under the requested key ID in the keystore, an InvalidKeyID fault is produced.
- Otherwise, the status of the key is returned.
- */
- GetKeyStatus(request *GetKeyStatus) (*GetKeyStatusResponse, error)
- GetKeyStatusContext(ctx context.Context, request *GetKeyStatus) (*GetKeyStatusResponse, error)
- /*
- This operation returns whether a key pair contains a private key.
- Keys are uniquely identified using key IDs. If no key is stored under the requested key ID in the keystore or the key identified by the requested key ID does not identify a key pair,
- the device shall produce an InvalidKeyID fault.
- Otherwise, this operation returns true if the key pair identified by the key ID contains a private key, and false otherwise.
- */
- GetPrivateKeyStatus(request *GetPrivateKeyStatus) (*GetPrivateKeyStatusResponse, error)
- GetPrivateKeyStatusContext(ctx context.Context, request *GetPrivateKeyStatus) (*GetPrivateKeyStatusResponse, error)
- /*
- This operation returns information about all keys that are stored in the device’s keystore.
- This operation may be used, e.g., if a client lost track of which keys are present on the device.
- If no key is stored on the device, an empty list is returned.
- */
- GetAllKeys(request *GetAllKeys) (*GetAllKeysResponse, error)
- GetAllKeysContext(ctx context.Context, request *GetAllKeys) (*GetAllKeysResponse, error)
- /*
- This operation deletes a key from the device’s keystore.
- Keys are uniquely identified using key IDs. If no key is stored under the requested key ID in the keystore, a device shall produce an InvalidArgVal fault.
- If a reference exists for the specified key, a device shall produce the corresponding fault and shall not delete the key.
- If there is a key under the requested key ID stored in the keystore and the key could not be deleted, a device shall produce a KeyDeletion fault.
- If the key has the status generating, a device shall abort the generation of the key and delete from the keystore all data generated for this key.
- After a key is successfully deleted, the device may assign its former ID to other keys.
- */
- DeleteKey(request *DeleteKey) (*DeleteKeyResponse, error)
- DeleteKeyContext(ctx context.Context, request *DeleteKey) (*DeleteKeyResponse, error)
- /*
- This operation generates a DER-encoded PKCS#10 v1.7 certification request (sometimes also called certificate signing request or CSR) as specified in RFC 2986
- for a public key on the device.
- The key pair that contains the public key for which a certification request shall be produced is specified by its key ID.
- If no key is stored under the requested KeyID or the key specified by the requested KeyID is not an asymmetric key pair, an invalid key ID fault shall be produced and
- no CSR shall be generated.
- A device that supports this command shall as minimum support the sha-1WithRSAEncryption signature algorithm as specified in RFC 3279.
- If the specified signature algorithm is not supported by the device, an UnsupportedSignatureAlgorithm fault shall be produced and no CSR shall be generated.
- If the public key identified by the requested Key ID is an invalid input to the specified signature algorithm, a KeySignatureAlgorithmMismatch fault shall be produced
- and no CSR shall be generated.
- If the key pair does not have status ok, a device shall produce an InvalidKeyStatus fault and no CSR shall be generated.
- */
- CreatePKCS10CSR(request *CreatePKCS10CSR) (*CreatePKCS10CSRResponse, error)
- CreatePKCS10CSRContext(ctx context.Context, request *CreatePKCS10CSR) (*CreatePKCS10CSRResponse, error)
- /*
- This operation generates for a public key on the device a self-signed X.509 certificate that complies to RFC 5280.
- The X509Version parameter specifies the version of X.509 that the generated certificate shall comply to.
- A device that supports this command shall support the generation of X.509v3 certificates as specified in RFC 5280 and may additionally be able to handle other X.509 certificate formats
- as indicated by the X.509Versions capability.
- The key pair that contains the public key for which a self-signed certificate shall be produced is specified by its key pair ID.
- The subject parameter describes the entity that the public key belongs to.
- If the key pair does not have status ok, a device shall produce an InvalidKeyStatus fault and no certificate shall be generated.
- The signature algorithm parameter determines which signature algorithm shall be used for signing the certification request with the public key specified by the key ID parameter.
- A device that supports this command shall as minimum support the sha-1WithRSAEncryption signature algorithm as specified in RFC 3279.
- The Extensions parameter specifies potential X509v3 extensions that shall be contained in the certificate.
- A device that supports this command shall support the extensions that are defined in [RFC 5280], Sect. 4.2] as mandatory for CAs that issue self-signed certificates.
- Certificates are uniquely identified using certificate IDs. If the command was successful, the device generates a new ID for the generated certificate and returns this ID.
- If the device does not have not enough storage capacity for storing the certificate to be created, the maximum number of certificates reached fault shall be produced and no certificate shall be generated.
- */
- CreateSelfSignedCertificate(request *CreateSelfSignedCertificate) (*CreateSelfSignedCertificateResponse, error)
- CreateSelfSignedCertificateContext(ctx context.Context, request *CreateSelfSignedCertificate) (*CreateSelfSignedCertificateResponse, error)
- /*
- This operation uploads an X.509 certificate as specified by [RFC 5280] in DER encoding and the public key in the certificate to a device’s keystore.
- A device that supports this command shall be able to handle X.509v3 certificates as specified in RFC 5280 and may additionally be able to handle other X.509 certificate formats as indicated by the X.509Versions capability.
- A device that supports this command shall support sha1-WithRSAEncryption as certificate signature algorithm.
- Certificates are uniquely identified using certificate IDs, and key pairs are uniquely identified using key IDs.
- The device shall generate a new certificate ID for the uploaded certificate.
- Certain certificate usages, e.g. TLS server authentication, require the private key that corresponds to the public key in the certificate to be present in the keystore.
- In such cases, the client may indicate that it expects the device to produce a fault if the matching private key for
- the uploaded certificate is not present in the keystore by setting the PrivateKeyRequired argument in the upload request to true.
- The uploaded certificate has to be linked to a key pair in the keystore.
- If no private key is required for the public key in the certificate and a key pair exists in the keystore with a public key equal to the public key in the certificate,
- the uploaded certificate is linked to the key pair identified by the supplied key ID by adding a reference from the certificate to the key pair.
- If no private key is required for the public key in the certificate and no key pair exists with the public key equal to the public key in the certificate,
- a new key pair with status ok is created with the public key from the certificate, and this key pair is linked to the uploaded certificate by adding a reference from
- the certificate to the key pair.
- If a private key is required for the public key in the certificate, and a key pair exists in the keystore with a private key that matches the public key in the certificate,
- the uploaded certificate is linked to this keypair by adding a reference from the certificate to the key pair.
- If a private key is required for the public key and no such keypair exists in the keystore, the NoMatchingPrivateKey fault shall be produced and the certificate
- shall not be stored in the keystore.
- If the key pair that the certificate shall be linked to does not have status ok, an InvalidKeyID fault is produced, and the uploaded certificate is not stored in the keystore.
- If the device cannot process the uploaded certificate, a BadCertificate fault is produced and neither the uploaded certificate nor the public key are stored in the device’s keystore.
- The BadCertificate fault shall not be produced based on the mere fact that the device’s current time lies outside the interval defined by the notBefore and notAfter fields as specified by [RFC 5280], Sect. 4.1 .
- This operation shall not mark the uploaded certificate as trusted.
- If the device does not have not enough storage capacity for storing the certificate to be uploaded, the maximum number of certificates reached fault shall be produced
- and no certificate shall be uploaded.
- If the device does not have not enough storage capacity for storing the key pair that eventually has to be created, the device shall generate a maximum number of keys reached fault.
- Furthermore the device shall not generate a key pair and no certificate shall be stored.
- */
- UploadCertificate(request *UploadCertificate) (*UploadCertificateResponse, error)
- UploadCertificateContext(ctx context.Context, request *UploadCertificate) (*UploadCertificateResponse, error)
- /*
- This operation returns a specific certificate from the device’s keystore.
- Certificates are uniquely identified using certificate IDs. If no certificate is stored under the requested certificate ID in the keystore, an InvalidArgVal fault is produced.
- It shall be noted that this command does not return the private key that is associated to the public key in the certificate.
- */
- GetCertificate(request *GetCertificate) (*GetCertificateResponse, error)
- GetCertificateContext(ctx context.Context, request *GetCertificate) (*GetCertificateResponse, error)
- /*
- This operation returns the IDs of all certificates that are stored in the device’s keystore.
- This operation may be used, e.g., if a client lost track of which certificates are present on the device.
- If no certificate is stored in the device’s keystore, an empty list is returned.
- */
- GetAllCertificates(request *GetAllCertificates) (*GetAllCertificatesResponse, error)
- GetAllCertificatesContext(ctx context.Context, request *GetAllCertificates) (*GetAllCertificatesResponse, error)
- /*
- This operation deletes a certificate from the device’s keystore.
- The operation shall not delete the public key that is contained in the certificate from the keystore.
- Certificates are uniquely identified using certificate IDs. If no certificate is stored under the requested certificate ID in the keystore, an InvalidArgVal fault is produced.
- If there is a certificate under the requested certificate ID stored in the keystore and the certificate could not be deleted, a CertificateDeletion fault is produced.
- If a reference exists for the specified certificate, the certificate shall not be deleted and the corresponding fault shall be produced.
- After a certificate has been successfully deleted, the device may assign its former ID to other certificates.
- */
- DeleteCertificate(request *DeleteCertificate) (*DeleteCertificateResponse, error)
- DeleteCertificateContext(ctx context.Context, request *DeleteCertificate) (*DeleteCertificateResponse, error)
- /*
- This operation creates a sequence of certificates that may be used, e.g., for certification path validation or for TLS server authentication.
- Certification paths are uniquely identified using certification path IDs. Certificates are uniquely identified using certificate IDs.
- A certification path contains a sequence of certificate IDs.
- If there is a certificate ID in the sequence of supplied certificate IDs for which no certificate exists in the device’s keystore, the corresponding fault shall be produced
- and no certification path shall be created.
- The signature of each certificate in the certification path except for the last one must be verifiable with the public key contained in the next certificate in the path.
- If there is a certificate ID in the request other than the last ID for which the corresponding certificate cannot be verified with the public key in the certificate identified
- by the next certificate ID, an InvalidCertificateChain fault shall be produced and no certification path shall be created.
- */
- CreateCertificationPath(request *CreateCertificationPath) (*CreateCertificationPathResponse, error)
- CreateCertificationPathContext(ctx context.Context, request *CreateCertificationPath) (*CreateCertificationPathResponse, error)
- /*
- This operation returns a specific certification path from the device’s keystore.
- Certification paths are uniquely identified using certification path IDs.
- If no certification path is stored under the requested ID in the keystore, an InvalidArgVal fault is produced.
- */
- GetCertificationPath(request *GetCertificationPath) (*GetCertificationPathResponse, error)
- GetCertificationPathContext(ctx context.Context, request *GetCertificationPath) (*GetCertificationPathResponse, error)
- /*
- This operation returns the IDs of all certification paths that are stored in the device’s keystore.
- This operation may be used, e.g., if a client lost track of which certificates are present on the device.
- If no certification path is stored on the device, an empty list is returned.
- */
- GetAllCertificationPaths(request *GetAllCertificationPaths) (*GetAllCertificationPathsResponse, error)
- GetAllCertificationPathsContext(ctx context.Context, request *GetAllCertificationPaths) (*GetAllCertificationPathsResponse, error)
- /*
- This operation deletes a certification path from the device’s keystore.
- This operation shall not delete the certificates that are referenced by the certification path.
- Certification paths are uniquely identified using certification path IDs.
- If no certification path is stored under the requested certification path ID in the keystore, an InvalidArgVal fault is produced.
- If there is a certification path under the requested certification path ID stored in the keystore and the certification path could not be deleted,
- a CertificationPathDeletion fault is produced.
- If a reference exists for the specified certification path, the certification path shall not be deleted and the corresponding fault shall be produced.
- After a certification path is successfully deleted, the device may assign its former ID to other certification paths.
- */
- DeleteCertificationPath(request *DeleteCertificationPath) (*DeleteCertificationPathResponse, error)
- DeleteCertificationPathContext(ctx context.Context, request *DeleteCertificationPath) (*DeleteCertificationPathResponse, error)
- /*
- This operation uploads a passphrase to the keystore of the device.
- */
- UploadPassphrase(request *UploadPassphrase) (*UploadPassphraseResponse, error)
- UploadPassphraseContext(ctx context.Context, request *UploadPassphrase) (*UploadPassphraseResponse, error)
- /*
- This operation returns information about all passphrases that are stored in the keystore of the device.
- This operation may be used, e.g., if a client lost track of which passphrases are present on the device.
- If no passphrase is stored on the device, the device shall return an empty list.
- */
- GetAllPassphrases(request *GetAllPassphrases) (*GetAllPassphrasesResponse, error)
- GetAllPassphrasesContext(ctx context.Context, request *GetAllPassphrases) (*GetAllPassphrasesResponse, error)
- /*
- This operation deletes a passphrase from the keystore of the device.
- */
- DeletePassphrase(request *DeletePassphrase) (*DeletePassphraseResponse, error)
- DeletePassphraseContext(ctx context.Context, request *DeletePassphrase) (*DeletePassphraseResponse, error)
- /*
- This operation uploads a certificate revocation list (CRL) as specified in [RFC 5280] to the keystore on the device.
- If the device does not have enough storage space to store the CRL to be uploaded, the device shall produce a MaximumNumberOfCRLsReached fault and shall not store the supplied CRL.
- If the device is not able to process the supplied CRL, the device shall produce a BadCRL fault and shall not store the supplied CRL.
- If the device does not support the signature algorithm that was used to sign the supplied CRL, the device shall produce an UnsupportedSignatureAlgorithm fault and shall not store the supplied CRL.
- */
- UploadCRL(request *UploadCRL) (*UploadCRLResponse, error)
- UploadCRLContext(ctx context.Context, request *UploadCRL) (*UploadCRLResponse, error)
- /*
- This operation returns a specific certificate revocation list (CRL) from the keystore on the device.
- Certification revocation lists are uniquely identified using CRLIDs. If no CRL is stored under the requested CRLID, the device shall produce a CRLID fault.
- */
- GetCRL(request *GetCRL) (*GetCRLResponse, error)
- GetCRLContext(ctx context.Context, request *GetCRL) (*GetCRLResponse, error)
- /*
- This operation returns all certificate revocation lists (CRLs) that are stored in the keystore on the device.
- If no certificate revocation list is stored in the device’s keystore, an empty list is returned.
- */
- GetAllCRLs(request *GetAllCRLs) (*GetAllCRLsResponse, error)
- GetAllCRLsContext(ctx context.Context, request *GetAllCRLs) (*GetAllCRLsResponse, error)
- /*
- This operation deletes a certificate revocation list (CRL) from the keystore on the device.
- Certification revocation lists are uniquely identified using CRLIDs. If no CRL is stored under the requested CRLID, the device shall produce a CRLID fault.
- If a reference exists for the specified CRL, the device shall produce a ReferenceExists fault and shall not delete the CRL.
- After a CRL has been successfully deleted, a device may assign its former ID to other CRLs.
- */
- DeleteCRL(request *DeleteCRL) (*DeleteCRLResponse, error)
- DeleteCRLContext(ctx context.Context, request *DeleteCRL) (*DeleteCRLResponse, error)
- /*
- This operation creates a certification path validation policy.
- Certification path validation policies are uniquely identified using certification path validation policy IDs. The device shall generate a new certification path validation policy ID for the created certification path validation policy.
- For the certification path validation parameters that are not represented in the certPathValidationParameters data type, the device shall use the default values specified in Sect. 3.
- If the device does not have enough storage capacity for storing the certification path validation policy to be created, the device shall produce a maximum number of certification path validation policies reached fault and shall not create a certification path validation policy.
- If there is at least one trust anchor certificate ID in the request for which there exists no certificate in the device’s keystore, the device shall produce a CertificateID fault and shall not create a certification path validation policy.
- If the device cannot process the supplied certification path validation parameters, the device shall produce a CertPathValidationParameters fault and shall not create a certification path validation policy.
- */
- CreateCertPathValidationPolicy(request *CreateCertPathValidationPolicy) (*CreateCertPathValidationPolicyResponse, error)
- CreateCertPathValidationPolicyContext(ctx context.Context, request *CreateCertPathValidationPolicy) (*CreateCertPathValidationPolicyResponse, error)
- /*
- This operation returns a certification path validation policy from the keystore on the device.
- Certification path validation policies are uniquely identified using certification path validation policy IDs. If no certification path validation policy is stored under the requested certification path validation policy ID, the device shall produce a CertPathValidationPolicyID fault.
- */
- GetCertPathValidationPolicy(request *GetCertPathValidationPolicy) (*GetCertPathValidationPolicyResponse, error)
- GetCertPathValidationPolicyContext(ctx context.Context, request *GetCertPathValidationPolicy) (*GetCertPathValidationPolicyResponse, error)
- /*
- This operation returns all certification path validation policies that are stored in the keystore on the device.
- If no certification path validation policy is stored in the device’s keystore, an empty list is returned.
- */
- GetAllCertPathValidationPolicies(request *GetAllCertPathValidationPolicies) (*GetAllCertPathValidationPoliciesResponse, error)
- GetAllCertPathValidationPoliciesContext(ctx context.Context, request *GetAllCertPathValidationPolicies) (*GetAllCertPathValidationPoliciesResponse, error)
- /*
- This operation deletes a certification path validation policy from the keystore on the device.
- Certification path validation policies are uniquely identified using certification path validation policy IDs. If no certification path validation policy is stored under the requested certification path validation policy ID, the device shall produce an InvalidCertPathValidationPolicyID fault.
- If a reference exists for the requested certification path validation policy, the device shall produce a ReferenceExists fault and shall not delete the certification path validation policy.
- After the certification path validation policy has been deleted, the device may assign its former ID to other certification path validation policies.
- */
- DeleteCertPathValidationPolicy(request *DeleteCertPathValidationPolicy) (*DeleteCertPathValidationPolicyResponse, error)
- DeleteCertPathValidationPolicyContext(ctx context.Context, request *DeleteCertPathValidationPolicy) (*DeleteCertPathValidationPolicyResponse, error)
- }
- // keystore type
- type keystore struct {
- client *soap.Client
- xaddr string
- }
- func NewKeystore(client *soap.Client, xaddr string) Keystore {
- return &keystore{
- client: client,
- xaddr: xaddr,
- }
- }
- func (service *keystore) CreateRSAKeyPairContext(ctx context.Context, request *CreateRSAKeyPair) (*CreateRSAKeyPairResponse, error) {
- response := new(CreateRSAKeyPairResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/CreateRSAKeyPair", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) CreateRSAKeyPair(request *CreateRSAKeyPair) (*CreateRSAKeyPairResponse, error) {
- return service.CreateRSAKeyPairContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) UploadKeyPairInPKCS8Context(ctx context.Context, request *UploadKeyPairInPKCS8) (*UploadKeyPairInPKCS8Response, error) {
- response := new(UploadKeyPairInPKCS8Response)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/UploadKeyPairInPKCS8", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) UploadKeyPairInPKCS8(request *UploadKeyPairInPKCS8) (*UploadKeyPairInPKCS8Response, error) {
- return service.UploadKeyPairInPKCS8Context(
- context.Background(),
- request,
- )
- }
- func (service *keystore) UploadCertificateWithPrivateKeyInPKCS12Context(ctx context.Context, request *UploadCertificateWithPrivateKeyInPKCS12) (*UploadCertificateWithPrivateKeyInPKCS12Response, error) {
- response := new(UploadCertificateWithPrivateKeyInPKCS12Response)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/UploadCertificateWithPrivateKeyInPKCS12", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) UploadCertificateWithPrivateKeyInPKCS12(request *UploadCertificateWithPrivateKeyInPKCS12) (*UploadCertificateWithPrivateKeyInPKCS12Response, error) {
- return service.UploadCertificateWithPrivateKeyInPKCS12Context(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetKeyStatusContext(ctx context.Context, request *GetKeyStatus) (*GetKeyStatusResponse, error) {
- response := new(GetKeyStatusResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetKeyStatus", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetKeyStatus(request *GetKeyStatus) (*GetKeyStatusResponse, error) {
- return service.GetKeyStatusContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetPrivateKeyStatusContext(ctx context.Context, request *GetPrivateKeyStatus) (*GetPrivateKeyStatusResponse, error) {
- response := new(GetPrivateKeyStatusResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetPrivateKeyStatus", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetPrivateKeyStatus(request *GetPrivateKeyStatus) (*GetPrivateKeyStatusResponse, error) {
- return service.GetPrivateKeyStatusContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetAllKeysContext(ctx context.Context, request *GetAllKeys) (*GetAllKeysResponse, error) {
- response := new(GetAllKeysResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetAllKeys", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetAllKeys(request *GetAllKeys) (*GetAllKeysResponse, error) {
- return service.GetAllKeysContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) DeleteKeyContext(ctx context.Context, request *DeleteKey) (*DeleteKeyResponse, error) {
- response := new(DeleteKeyResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/DeleteKey", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) DeleteKey(request *DeleteKey) (*DeleteKeyResponse, error) {
- return service.DeleteKeyContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) CreatePKCS10CSRContext(ctx context.Context, request *CreatePKCS10CSR) (*CreatePKCS10CSRResponse, error) {
- response := new(CreatePKCS10CSRResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/CreatePKCS10CSR", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) CreatePKCS10CSR(request *CreatePKCS10CSR) (*CreatePKCS10CSRResponse, error) {
- return service.CreatePKCS10CSRContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) CreateSelfSignedCertificateContext(ctx context.Context, request *CreateSelfSignedCertificate) (*CreateSelfSignedCertificateResponse, error) {
- response := new(CreateSelfSignedCertificateResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/CreateSelfSignedCertificate", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) CreateSelfSignedCertificate(request *CreateSelfSignedCertificate) (*CreateSelfSignedCertificateResponse, error) {
- return service.CreateSelfSignedCertificateContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) UploadCertificateContext(ctx context.Context, request *UploadCertificate) (*UploadCertificateResponse, error) {
- response := new(UploadCertificateResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/UploadCertificate", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) UploadCertificate(request *UploadCertificate) (*UploadCertificateResponse, error) {
- return service.UploadCertificateContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetCertificateContext(ctx context.Context, request *GetCertificate) (*GetCertificateResponse, error) {
- response := new(GetCertificateResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetCertificate", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetCertificate(request *GetCertificate) (*GetCertificateResponse, error) {
- return service.GetCertificateContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetAllCertificatesContext(ctx context.Context, request *GetAllCertificates) (*GetAllCertificatesResponse, error) {
- response := new(GetAllCertificatesResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetAllCertificates", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetAllCertificates(request *GetAllCertificates) (*GetAllCertificatesResponse, error) {
- return service.GetAllCertificatesContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) DeleteCertificateContext(ctx context.Context, request *DeleteCertificate) (*DeleteCertificateResponse, error) {
- response := new(DeleteCertificateResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/DeleteCertificate", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) DeleteCertificate(request *DeleteCertificate) (*DeleteCertificateResponse, error) {
- return service.DeleteCertificateContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) CreateCertificationPathContext(ctx context.Context, request *CreateCertificationPath) (*CreateCertificationPathResponse, error) {
- response := new(CreateCertificationPathResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/CreateCertificationPath", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) CreateCertificationPath(request *CreateCertificationPath) (*CreateCertificationPathResponse, error) {
- return service.CreateCertificationPathContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetCertificationPathContext(ctx context.Context, request *GetCertificationPath) (*GetCertificationPathResponse, error) {
- response := new(GetCertificationPathResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetCertificationPath", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetCertificationPath(request *GetCertificationPath) (*GetCertificationPathResponse, error) {
- return service.GetCertificationPathContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetAllCertificationPathsContext(ctx context.Context, request *GetAllCertificationPaths) (*GetAllCertificationPathsResponse, error) {
- response := new(GetAllCertificationPathsResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetAllCertificationPaths", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetAllCertificationPaths(request *GetAllCertificationPaths) (*GetAllCertificationPathsResponse, error) {
- return service.GetAllCertificationPathsContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) DeleteCertificationPathContext(ctx context.Context, request *DeleteCertificationPath) (*DeleteCertificationPathResponse, error) {
- response := new(DeleteCertificationPathResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/DeleteCertificationPath", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) DeleteCertificationPath(request *DeleteCertificationPath) (*DeleteCertificationPathResponse, error) {
- return service.DeleteCertificationPathContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) UploadPassphraseContext(ctx context.Context, request *UploadPassphrase) (*UploadPassphraseResponse, error) {
- response := new(UploadPassphraseResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/UploadPassphrase", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) UploadPassphrase(request *UploadPassphrase) (*UploadPassphraseResponse, error) {
- return service.UploadPassphraseContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetAllPassphrasesContext(ctx context.Context, request *GetAllPassphrases) (*GetAllPassphrasesResponse, error) {
- response := new(GetAllPassphrasesResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetAllPassphrases", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetAllPassphrases(request *GetAllPassphrases) (*GetAllPassphrasesResponse, error) {
- return service.GetAllPassphrasesContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) DeletePassphraseContext(ctx context.Context, request *DeletePassphrase) (*DeletePassphraseResponse, error) {
- response := new(DeletePassphraseResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/DeletePassphrase", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) DeletePassphrase(request *DeletePassphrase) (*DeletePassphraseResponse, error) {
- return service.DeletePassphraseContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) UploadCRLContext(ctx context.Context, request *UploadCRL) (*UploadCRLResponse, error) {
- response := new(UploadCRLResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/UploadCRL", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) UploadCRL(request *UploadCRL) (*UploadCRLResponse, error) {
- return service.UploadCRLContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetCRLContext(ctx context.Context, request *GetCRL) (*GetCRLResponse, error) {
- response := new(GetCRLResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetCRL", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetCRL(request *GetCRL) (*GetCRLResponse, error) {
- return service.GetCRLContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetAllCRLsContext(ctx context.Context, request *GetAllCRLs) (*GetAllCRLsResponse, error) {
- response := new(GetAllCRLsResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetAllCRLs", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetAllCRLs(request *GetAllCRLs) (*GetAllCRLsResponse, error) {
- return service.GetAllCRLsContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) DeleteCRLContext(ctx context.Context, request *DeleteCRL) (*DeleteCRLResponse, error) {
- response := new(DeleteCRLResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/DeleteCRL", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) DeleteCRL(request *DeleteCRL) (*DeleteCRLResponse, error) {
- return service.DeleteCRLContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) CreateCertPathValidationPolicyContext(ctx context.Context, request *CreateCertPathValidationPolicy) (*CreateCertPathValidationPolicyResponse, error) {
- response := new(CreateCertPathValidationPolicyResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/CreateCertPathValidationPolicy", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) CreateCertPathValidationPolicy(request *CreateCertPathValidationPolicy) (*CreateCertPathValidationPolicyResponse, error) {
- return service.CreateCertPathValidationPolicyContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetCertPathValidationPolicyContext(ctx context.Context, request *GetCertPathValidationPolicy) (*GetCertPathValidationPolicyResponse, error) {
- response := new(GetCertPathValidationPolicyResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetCertPathValidationPolicy", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetCertPathValidationPolicy(request *GetCertPathValidationPolicy) (*GetCertPathValidationPolicyResponse, error) {
- return service.GetCertPathValidationPolicyContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) GetAllCertPathValidationPoliciesContext(ctx context.Context, request *GetAllCertPathValidationPolicies) (*GetAllCertPathValidationPoliciesResponse, error) {
- response := new(GetAllCertPathValidationPoliciesResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetAllCertPathValidationPolicies", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) GetAllCertPathValidationPolicies(request *GetAllCertPathValidationPolicies) (*GetAllCertPathValidationPoliciesResponse, error) {
- return service.GetAllCertPathValidationPoliciesContext(
- context.Background(),
- request,
- )
- }
- func (service *keystore) DeleteCertPathValidationPolicyContext(ctx context.Context, request *DeleteCertPathValidationPolicy) (*DeleteCertPathValidationPolicyResponse, error) {
- response := new(DeleteCertPathValidationPolicyResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/DeleteCertPathValidationPolicy", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *keystore) DeleteCertPathValidationPolicy(request *DeleteCertPathValidationPolicy) (*DeleteCertPathValidationPolicyResponse, error) {
- return service.DeleteCertPathValidationPolicyContext(
- context.Background(),
- request,
- )
- }
- // TLSServer type
- type TLSServer interface {
- /*
- This operation assigns a key pair and certificate along with a certification path (certificate chain) to the TLS server on the device.
- The TLS server shall use this information for key exchange during the TLS handshake, particularly for constructing server certificate messages as specified in RFC 4346 and RFC 2246.
- Certification paths are identified by their certification path IDs in the keystore. The first certificate in the certification path must be the TLS server certificate.
- Since each certificate has exactly one associated key pair, a reference to the key pair that is associated with the server certificate is not supplied explicitly.
- Devices shall obtain the private key or results of operations under the private key by suitable internal interaction with the keystore.
- If a device chooses to perform a TLS key exchange based on the supplied certification path, it shall use the key pair that is associated with the server certificate for
- key exchange and transmit the certification path to TLS clients as-is, i.e., the device shall not check conformance of the certification path to RFC 4346 norRFC 2246.
- In order to use the server certificate during the TLS handshake, the corresponding private key is required.
- Therefore, if the key pair that is associated with the server certificate, i.e., the first certificate in the certification path, does not have an associated private key,
- the NoPrivateKey fault is produced and the certification path is not associated to the TLS server.
- A TLS server may present different certification paths to different clients during the TLS handshake instead of presenting the same certification path to all clients.
- Therefore more than one certification path may be assigned to the TLS server.
- If the maximum number of certification paths that may be assigned to the TLS server simultaneously is reached, the device shall generate a MaximumNumberOfCertificationPathsReached
- fault and the requested certification path shall not be assigned to the TLS server.
- */
- AddServerCertificateAssignment(request *AddServerCertificateAssignment) (*AddServerCertificateAssignmentResponse, error)
- AddServerCertificateAssignmentContext(ctx context.Context, request *AddServerCertificateAssignment) (*AddServerCertificateAssignmentResponse, error)
- /*
- This operation removes a key pair and certificate assignment (including certification path) to the TLS server on the device.
- Certification paths are identified using certification path IDs. If the supplied certification path ID is not associated to the TLS server, an InvalidArgVal fault is produced.
- */
- RemoveServerCertificateAssignment(request *RemoveServerCertificateAssignment) (*RemoveServerCertificateAssignmentResponse, error)
- RemoveServerCertificateAssignmentContext(ctx context.Context, request *RemoveServerCertificateAssignment) (*RemoveServerCertificateAssignmentResponse, error)
- /*
- This operation replaces an existing key pair and certificate assignment to the TLS server on the device by a new key pair and certificate assignment (including certification paths).
- After the replacement, the TLS server shall use the new certificate and certification path exactly in those cases in which it would have used the old certificate and certification path.
- Therefore, especially in the case that several server certificates are assigned to the TLS server, clients that wish to replace an old certificate assignment by a new assignment
- should use this operation instead of a combination of the Add TLS Server Certificate Assignment and the Remove TLS Server Certificate Assignment operations.
- Certification paths are identified using certification path IDs. If the supplied old certification path ID is not associated to the TLS server, or no certification path exists
- under the new certification path ID, the corresponding InvalidArgVal faults are produced and the associations are unchanged.
- The first certificate in the new certification path must be the TLS server certificate.
- Since each certificate has exactly one associated key pair, a reference to the key pair that is associated with the new server certificate is not supplied explicitly.
- Devices shall obtain the private key or results of operations under the private key by suitable internal interaction with the keystore.
- If a device chooses to perform a TLS key exchange based on the new certification path, it shall use the key pair that is associated with the server certificate
- for key exchange and transmit the certification path to TLS clients as-is, i.e., the device shall not check conformance of the certification path to RFC 4346 norRFC 2246.
- In order to use the server certificate during the TLS handshake, the corresponding private key is required.
- Therefore, if the key pair that is associated with the server certificate, i.e., the first certificate in the certification path, does not have an associated private key,
- the NoPrivateKey fault is produced and the certification path is not associated to the TLS server.
- */
- ReplaceServerCertificateAssignment(request *ReplaceServerCertificateAssignment) (*ReplaceServerCertificateAssignmentResponse, error)
- ReplaceServerCertificateAssignmentContext(ctx context.Context, request *ReplaceServerCertificateAssignment) (*ReplaceServerCertificateAssignmentResponse, error)
- /*
- This operation sets the version(s) of TLS which the device shall use. Valid values are taken from the TLSServerSupported capability.
- A client initiates a TLS session by sending a ClientHello with the hightest TLS version it supports. This suggests to the server that the client can accept any TLS version up to and including that version.
- The server then chooses the TLS version to use. This is generally the highest TLS version the server supports that is within the range of the client. For example, if a ClientHello indicates TLS version 1.1, the server can proceed with TLS 1.0 or TLS 1.1.
- In the event that an ONVIF installation wishes to disable certain version(s) of TLS, it may do so with this operation. For example, to disable TLS 1.0 on a device signaling support for TLS versions 1.0, 1.1, and 1.2, the enabled version list may be set to "1.1 1.2", omitting 1.0. If a client then attempts to connect with a ClientHello containing TLS 1.0, the server shall send a "protocol_version" alert message and close the connection. This handshake indicates to the client that TLS 1.0 is not supported by the server. The client must try again with a higher TLS version suggestion.
- An empty list is not permitted. Disabling all versions of TLS is not the intent of this operation. See AddServerCertificateAssignment and RemoveServerCertificateAssignment.
- */
- SetEnabledTLSVersions(request *SetEnabledTLSVersions) (*SetEnabledTLSVersionsResponse, error)
- SetEnabledTLSVersionsContext(ctx context.Context, request *SetEnabledTLSVersions) (*SetEnabledTLSVersionsResponse, error)
- /*
- This operation retrieves the version(s) of TLS which are currently enabled on the device.
- */
- GetEnabledTLSVersions(request *GetEnabledTLSVersions) (*GetEnabledTLSVersionsResponse, error)
- GetEnabledTLSVersionsContext(ctx context.Context, request *GetEnabledTLSVersions) (*GetEnabledTLSVersionsResponse, error)
- /*
- This operation returns the IDs of all key pairs and certificates (including certification paths) that are assigned to the TLS server on the device.
- This operation may be used, e.g., if a client lost track of the certification path assignments on the device.
- If no certification path is assigned to the TLS server, an empty list is returned.
- */
- GetAssignedServerCertificates(request *GetAssignedServerCertificates) (*GetAssignedServerCertificatesResponse, error)
- GetAssignedServerCertificatesContext(ctx context.Context, request *GetAssignedServerCertificates) (*GetAssignedServerCertificatesResponse, error)
- /*
- This operation activates or deactivates TLS client authentication for the TLS server on the device.
- The TLS server on the device shall require client authentication if and only if clientAuthenticationRequired is set to true.
- If TLS client authentication is requested to be enabled and no certification path validation policy is assigned to the TLS server, the device shall return an EnablingTLSClientAuthenticationFailed fault and shall not enable TLS client authentication.
- The device shall execute this command regardless of the TLS enabled/disabled state configured in the ONVIF Device Management Service.
- */
- SetClientAuthenticationRequired(request *SetClientAuthenticationRequired) (*SetClientAuthenticationRequiredResponse, error)
- SetClientAuthenticationRequiredContext(ctx context.Context, request *SetClientAuthenticationRequired) (*SetClientAuthenticationRequiredResponse, error)
- /*
- This operation returns whether TLS client authentication is active.
- */
- GetClientAuthenticationRequired(request *GetClientAuthenticationRequired) (*GetClientAuthenticationRequiredResponse, error)
- GetClientAuthenticationRequiredContext(ctx context.Context, request *GetClientAuthenticationRequired) (*GetClientAuthenticationRequiredResponse, error)
- /*
- This operation assigns a certification path validation policy to the TLS server on the device. The TLS server shall enforce the policy when authenticating TLS clients and consider a client authentic if and only if the algorithm returns valid.
- If no certification path validation policy is stored under the requested CertPathValidationPolicyID, the device shall produce a CertPathValidationPolicyID fault.
- A TLS server may use different certification path validation policies to authenticate clients. Therefore more than one certification path validation policy may be assigned to the TLS server. If the maximum number of certification path validation policies that may be assigned to the TLS server simultaneously is reached, the device shall produce a MaximumNumberOfTLSCertPathValidationPoliciesReached fault and shall not assign the requested certification path validation policy to the TLS server.
- */
- AddCertPathValidationPolicyAssignment(request *AddCertPathValidationPolicyAssignment) (*AddCertPathValidationPolicyAssignmentResponse, error)
- AddCertPathValidationPolicyAssignmentContext(ctx context.Context, request *AddCertPathValidationPolicyAssignment) (*AddCertPathValidationPolicyAssignmentResponse, error)
- /*
- This operation removes a certification path validation policy assignment from the TLS server on the device.
- If the certification path validation policy identified by the requested CertPathValidationPolicyID is not associated to the TLS server, the device shall produce a CertPathValidationPolicy fault.
- */
- RemoveCertPathValidationPolicyAssignment(request *RemoveCertPathValidationPolicyAssignment) (*RemoveCertPathValidationPolicyAssignmentResponse, error)
- RemoveCertPathValidationPolicyAssignmentContext(ctx context.Context, request *RemoveCertPathValidationPolicyAssignment) (*RemoveCertPathValidationPolicyAssignmentResponse, error)
- /*
- This operation replaces a certification path validation policy assignment to the TLS server on the device with another certification path validation policy assignment.
- If the certification path validation policy identified by the requested OldCertPathValidationPolicyID is not associated to the TLS server, the device shall produce an OldCertPathValidationPolicyID fault and shall not associate the certification path validation policy identified by the NewCertPathValidationPolicyID to the TLS server.
- If no certification path validation policy exists under the requested NewCertPathValidationPolicyID in the device’s keystore, the device shall produce a NewCertPathValidationPolicyID fault and shall not remove the association of the old certification path validation policy to the TLS server.
- */
- ReplaceCertPathValidationPolicyAssignment(request *ReplaceCertPathValidationPolicyAssignment) (*ReplaceCertPathValidationPolicyAssignmentResponse, error)
- ReplaceCertPathValidationPolicyAssignmentContext(ctx context.Context, request *ReplaceCertPathValidationPolicyAssignment) (*ReplaceCertPathValidationPolicyAssignmentResponse, error)
- /*
- This operation returns the IDs of all certification path validation policies that are assigned to the TLS server on the device.
- */
- GetAssignedCertPathValidationPolicies(request *GetAssignedCertPathValidationPolicies) (*GetAssignedCertPathValidationPoliciesResponse, error)
- GetAssignedCertPathValidationPoliciesContext(ctx context.Context, request *GetAssignedCertPathValidationPolicies) (*GetAssignedCertPathValidationPoliciesResponse, error)
- }
- // tLSServer type
- type tLSServer struct {
- client *soap.Client
- xaddr string
- }
- func NewTLSServer(client *soap.Client, xaddr string) TLSServer {
- return &tLSServer{
- client: client,
- xaddr: xaddr,
- }
- }
- func (service *tLSServer) AddServerCertificateAssignmentContext(ctx context.Context, request *AddServerCertificateAssignment) (*AddServerCertificateAssignmentResponse, error) {
- response := new(AddServerCertificateAssignmentResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/AddServerCertificateAssignment", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) AddServerCertificateAssignment(request *AddServerCertificateAssignment) (*AddServerCertificateAssignmentResponse, error) {
- return service.AddServerCertificateAssignmentContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) RemoveServerCertificateAssignmentContext(ctx context.Context, request *RemoveServerCertificateAssignment) (*RemoveServerCertificateAssignmentResponse, error) {
- response := new(RemoveServerCertificateAssignmentResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/RemoveServerCertificateAssignment", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) RemoveServerCertificateAssignment(request *RemoveServerCertificateAssignment) (*RemoveServerCertificateAssignmentResponse, error) {
- return service.RemoveServerCertificateAssignmentContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) ReplaceServerCertificateAssignmentContext(ctx context.Context, request *ReplaceServerCertificateAssignment) (*ReplaceServerCertificateAssignmentResponse, error) {
- response := new(ReplaceServerCertificateAssignmentResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/ReplaceServerCertificateAssignment", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) ReplaceServerCertificateAssignment(request *ReplaceServerCertificateAssignment) (*ReplaceServerCertificateAssignmentResponse, error) {
- return service.ReplaceServerCertificateAssignmentContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) SetEnabledTLSVersionsContext(ctx context.Context, request *SetEnabledTLSVersions) (*SetEnabledTLSVersionsResponse, error) {
- response := new(SetEnabledTLSVersionsResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/SetEnabledTLSVersions", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) SetEnabledTLSVersions(request *SetEnabledTLSVersions) (*SetEnabledTLSVersionsResponse, error) {
- return service.SetEnabledTLSVersionsContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) GetEnabledTLSVersionsContext(ctx context.Context, request *GetEnabledTLSVersions) (*GetEnabledTLSVersionsResponse, error) {
- response := new(GetEnabledTLSVersionsResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetEnabledTLSVersions", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) GetEnabledTLSVersions(request *GetEnabledTLSVersions) (*GetEnabledTLSVersionsResponse, error) {
- return service.GetEnabledTLSVersionsContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) GetAssignedServerCertificatesContext(ctx context.Context, request *GetAssignedServerCertificates) (*GetAssignedServerCertificatesResponse, error) {
- response := new(GetAssignedServerCertificatesResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetAssignedServerCertificates", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) GetAssignedServerCertificates(request *GetAssignedServerCertificates) (*GetAssignedServerCertificatesResponse, error) {
- return service.GetAssignedServerCertificatesContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) SetClientAuthenticationRequiredContext(ctx context.Context, request *SetClientAuthenticationRequired) (*SetClientAuthenticationRequiredResponse, error) {
- response := new(SetClientAuthenticationRequiredResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/SetClientAuthenticationRequired", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) SetClientAuthenticationRequired(request *SetClientAuthenticationRequired) (*SetClientAuthenticationRequiredResponse, error) {
- return service.SetClientAuthenticationRequiredContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) GetClientAuthenticationRequiredContext(ctx context.Context, request *GetClientAuthenticationRequired) (*GetClientAuthenticationRequiredResponse, error) {
- response := new(GetClientAuthenticationRequiredResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetClientAuthenticationRequired", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) GetClientAuthenticationRequired(request *GetClientAuthenticationRequired) (*GetClientAuthenticationRequiredResponse, error) {
- return service.GetClientAuthenticationRequiredContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) AddCertPathValidationPolicyAssignmentContext(ctx context.Context, request *AddCertPathValidationPolicyAssignment) (*AddCertPathValidationPolicyAssignmentResponse, error) {
- response := new(AddCertPathValidationPolicyAssignmentResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/AddCertPathValidationPolicyAssignment", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) AddCertPathValidationPolicyAssignment(request *AddCertPathValidationPolicyAssignment) (*AddCertPathValidationPolicyAssignmentResponse, error) {
- return service.AddCertPathValidationPolicyAssignmentContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) RemoveCertPathValidationPolicyAssignmentContext(ctx context.Context, request *RemoveCertPathValidationPolicyAssignment) (*RemoveCertPathValidationPolicyAssignmentResponse, error) {
- response := new(RemoveCertPathValidationPolicyAssignmentResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/RemoveCertPathValidationPolicyAssignment", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) RemoveCertPathValidationPolicyAssignment(request *RemoveCertPathValidationPolicyAssignment) (*RemoveCertPathValidationPolicyAssignmentResponse, error) {
- return service.RemoveCertPathValidationPolicyAssignmentContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) ReplaceCertPathValidationPolicyAssignmentContext(ctx context.Context, request *ReplaceCertPathValidationPolicyAssignment) (*ReplaceCertPathValidationPolicyAssignmentResponse, error) {
- response := new(ReplaceCertPathValidationPolicyAssignmentResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/ReplaceCertPathValidationPolicyAssignment", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) ReplaceCertPathValidationPolicyAssignment(request *ReplaceCertPathValidationPolicyAssignment) (*ReplaceCertPathValidationPolicyAssignmentResponse, error) {
- return service.ReplaceCertPathValidationPolicyAssignmentContext(
- context.Background(),
- request,
- )
- }
- func (service *tLSServer) GetAssignedCertPathValidationPoliciesContext(ctx context.Context, request *GetAssignedCertPathValidationPolicies) (*GetAssignedCertPathValidationPoliciesResponse, error) {
- response := new(GetAssignedCertPathValidationPoliciesResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetAssignedCertPathValidationPolicies", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *tLSServer) GetAssignedCertPathValidationPolicies(request *GetAssignedCertPathValidationPolicies) (*GetAssignedCertPathValidationPoliciesResponse, error) {
- return service.GetAssignedCertPathValidationPoliciesContext(
- context.Background(),
- request,
- )
- }
- // Dot1X type
- type Dot1X interface {
- /*
- (to be written)
- */
- AddDot1XConfiguration(request *AddDot1XConfiguration) (*AddDot1XConfigurationResponse, error)
- AddDot1XConfigurationContext(ctx context.Context, request *AddDot1XConfiguration) (*AddDot1XConfigurationResponse, error)
- /*
- (to be written)
- */
- GetAllDot1XConfigurations(request *GetAllDot1XConfigurations) (*GetAllDot1XConfigurationsResponse, error)
- GetAllDot1XConfigurationsContext(ctx context.Context, request *GetAllDot1XConfigurations) (*GetAllDot1XConfigurationsResponse, error)
- /*
- (to be written)
- */
- GetDot1XConfiguration(request *GetDot1XConfiguration) (*GetDot1XConfigurationResponse, error)
- GetDot1XConfigurationContext(ctx context.Context, request *GetDot1XConfiguration) (*GetDot1XConfigurationResponse, error)
- /*
- (to be written)
- */
- DeleteDot1XConfiguration(request *DeleteDot1XConfiguration) (*DeleteDot1XConfigurationResponse, error)
- DeleteDot1XConfigurationContext(ctx context.Context, request *DeleteDot1XConfiguration) (*DeleteDot1XConfigurationResponse, error)
- /*
- (to be written)
- */
- SetNetworkInterfaceDot1XConfiguration(request *SetNetworkInterfaceDot1XConfiguration) (*SetNetworkInterfaceDot1XConfigurationResponse, error)
- SetNetworkInterfaceDot1XConfigurationContext(ctx context.Context, request *SetNetworkInterfaceDot1XConfiguration) (*SetNetworkInterfaceDot1XConfigurationResponse, error)
- /*
- (to be written)
- */
- GetNetworkInterfaceDot1XConfiguration(request *GetNetworkInterfaceDot1XConfiguration) (*GetNetworkInterfaceDot1XConfigurationResponse, error)
- GetNetworkInterfaceDot1XConfigurationContext(ctx context.Context, request *GetNetworkInterfaceDot1XConfiguration) (*GetNetworkInterfaceDot1XConfigurationResponse, error)
- /*
- (to be written)
- */
- DeleteNetworkInterfaceDot1XConfiguration(request *DeleteNetworkInterfaceDot1XConfiguration) (*DeleteNetworkInterfaceDot1XConfigurationResponse, error)
- DeleteNetworkInterfaceDot1XConfigurationContext(ctx context.Context, request *DeleteNetworkInterfaceDot1XConfiguration) (*DeleteNetworkInterfaceDot1XConfigurationResponse, error)
- }
- // dot1X type
- type dot1X struct {
- client *soap.Client
- xaddr string
- }
- func NewDot1X(client *soap.Client, xaddr string) Dot1X {
- return &dot1X{
- client: client,
- xaddr: xaddr,
- }
- }
- func (service *dot1X) AddDot1XConfigurationContext(ctx context.Context, request *AddDot1XConfiguration) (*AddDot1XConfigurationResponse, error) {
- response := new(AddDot1XConfigurationResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/AddDot1XConfiguration", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *dot1X) AddDot1XConfiguration(request *AddDot1XConfiguration) (*AddDot1XConfigurationResponse, error) {
- return service.AddDot1XConfigurationContext(
- context.Background(),
- request,
- )
- }
- func (service *dot1X) GetAllDot1XConfigurationsContext(ctx context.Context, request *GetAllDot1XConfigurations) (*GetAllDot1XConfigurationsResponse, error) {
- response := new(GetAllDot1XConfigurationsResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetAllDot1XConfigurations", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *dot1X) GetAllDot1XConfigurations(request *GetAllDot1XConfigurations) (*GetAllDot1XConfigurationsResponse, error) {
- return service.GetAllDot1XConfigurationsContext(
- context.Background(),
- request,
- )
- }
- func (service *dot1X) GetDot1XConfigurationContext(ctx context.Context, request *GetDot1XConfiguration) (*GetDot1XConfigurationResponse, error) {
- response := new(GetDot1XConfigurationResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetDot1XConfiguration", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *dot1X) GetDot1XConfiguration(request *GetDot1XConfiguration) (*GetDot1XConfigurationResponse, error) {
- return service.GetDot1XConfigurationContext(
- context.Background(),
- request,
- )
- }
- func (service *dot1X) DeleteDot1XConfigurationContext(ctx context.Context, request *DeleteDot1XConfiguration) (*DeleteDot1XConfigurationResponse, error) {
- response := new(DeleteDot1XConfigurationResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/DeleteDot1XConfiguration", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *dot1X) DeleteDot1XConfiguration(request *DeleteDot1XConfiguration) (*DeleteDot1XConfigurationResponse, error) {
- return service.DeleteDot1XConfigurationContext(
- context.Background(),
- request,
- )
- }
- func (service *dot1X) SetNetworkInterfaceDot1XConfigurationContext(ctx context.Context, request *SetNetworkInterfaceDot1XConfiguration) (*SetNetworkInterfaceDot1XConfigurationResponse, error) {
- response := new(SetNetworkInterfaceDot1XConfigurationResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/SetNetworkInterfaceDot1XConfiguration", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *dot1X) SetNetworkInterfaceDot1XConfiguration(request *SetNetworkInterfaceDot1XConfiguration) (*SetNetworkInterfaceDot1XConfigurationResponse, error) {
- return service.SetNetworkInterfaceDot1XConfigurationContext(
- context.Background(),
- request,
- )
- }
- func (service *dot1X) GetNetworkInterfaceDot1XConfigurationContext(ctx context.Context, request *GetNetworkInterfaceDot1XConfiguration) (*GetNetworkInterfaceDot1XConfigurationResponse, error) {
- response := new(GetNetworkInterfaceDot1XConfigurationResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/GetNetworkInterfaceDot1XConfiguration", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *dot1X) GetNetworkInterfaceDot1XConfiguration(request *GetNetworkInterfaceDot1XConfiguration) (*GetNetworkInterfaceDot1XConfigurationResponse, error) {
- return service.GetNetworkInterfaceDot1XConfigurationContext(
- context.Background(),
- request,
- )
- }
- func (service *dot1X) DeleteNetworkInterfaceDot1XConfigurationContext(ctx context.Context, request *DeleteNetworkInterfaceDot1XConfiguration) (*DeleteNetworkInterfaceDot1XConfigurationResponse, error) {
- response := new(DeleteNetworkInterfaceDot1XConfigurationResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/advancedsecurity/wsdl/DeleteNetworkInterfaceDot1XConfiguration", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *dot1X) DeleteNetworkInterfaceDot1XConfiguration(request *DeleteNetworkInterfaceDot1XConfiguration) (*DeleteNetworkInterfaceDot1XConfigurationResponse, error) {
- return service.DeleteNetworkInterfaceDot1XConfigurationContext(
- context.Background(),
- request,
- )
- }
- // Duration type
- type Duration string
- // NCName type
- type NCName string
- // NonNegativeInteger type
- type NonNegativeInteger int64
- // PositiveInteger type
- type PositiveInteger int64
|