You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

ONVIF中KeyId/CertId/CertPathId及PassPhraseId的定义与创建方法问询

Understanding KeyId, CertId, CertPathId, and PassPhraseId in ONVIF

Great question—these identifiers are foundational to ONVIF's secure certificate and key management, which keeps device communication encrypted and authenticated. Let’s break down each one with clear definitions and how they’re typically created:

KeyId

What it is: A unique identifier for an asymmetric encryption key pair (public/private key) stored on an ONVIF device. It links keys to certificates, access control policies, or encryption operations like signing messages or decrypting data.

How it’s created:

  • Most commonly, the device auto-generates a KeyId when you create a key pair via the ONVIF CertificateManagement service’s CreateKeyPair command. This is usually a UUID or a hash of the public key (SHA-1 or SHA-256) for guaranteed uniqueness.
  • Some devices let you specify a custom KeyId during key creation, as long as it’s unique within the device’s key store.
  • If importing an existing key pair, the device may assign a new KeyId or let you reuse an existing identifier (depending on device support).

CertId

What it is: A unique identifier for a digital certificate (device certificate, CA certificate, etc.) stored in the device’s certificate repository. It’s used to reference specific certificates for authentication, encryption, or trust chain configuration.

How it’s created:

  • When generating a self-signed certificate via CreateCertificate or importing a certificate via ImportCertificate, the device automatically generates a CertId—usually a UUID, or a hash of the certificate’s serial number and subject DN.
  • Some devices allow you to define a custom CertId during import/generation, as long as it doesn’t conflict with existing entries.
  • You can retrieve existing CertIds using the GetCertificates command to list all stored certificates and their identifiers.

CertPathId

What it is: A unique identifier for a certificate path (trust chain) on the device. A certificate path includes the end-entity certificate plus all intermediate CA certificates and the root CA certificate needed to validate the end-entity certificate’s authenticity.

How it’s created:

  • When assembling a trust chain (e.g., importing a root CA and intermediate CA, then linking them to a device certificate), the device generates a CertPathId via the AddCertPath command. This is typically a UUID or a hash of all certificates in the chain combined.
  • The CertPathId lets the device quickly reference the full trust chain when validating incoming connections or signing outgoing requests.
  • You can list existing certificate paths with GetCertPaths to retrieve their CertPathIds.

PassPhraseId

What it is: A unique identifier for a stored passphrase (password) used to encrypt sensitive data like private keys. Instead of passing plaintext passphrases in API commands, you use this ID to reference the encrypted passphrase stored on the device.

How it’s created:

  • You create a PassPhraseId by using the SetPassPhrase command in the CertificateManagement service. The device encrypts the passphrase and assigns a unique ID (usually a UUID) to it.
  • When you need to use the passphrase (e.g., exporting a private key with ExportPrivateKey), you specify the PassPhraseId instead of the plaintext password.
  • Some devices let you overwrite existing PassPhraseIds or delete them with DeletePassPhrase.

内容的提问来源于stack exchange,提问作者krishnaj76

火山引擎 最新活动