{"record":{"id":"8929283ff79fc96f","repo":"projectdiscovery/nuclei","slug":"nuclei-user-certificate-not-found","errorCode":null,"errorMessage":"nuclei user certificate not found","messagePattern":"nuclei user certificate not found","errorType":"validation","errorClass":"ErrNoCertificate","httpStatus":null,"severity":"error","filePath":"pkg/templates/signer/handler.go","lineNumber":33,"sourceCode":"\t\"time\"\n\n\t\"github.com/projectdiscovery/gologger\"\n\tfileutil \"github.com/projectdiscovery/utils/file\"\n\t\"github.com/rs/xid\"\n\t\"golang.org/x/term\"\n)\n\nconst (\n\tCertType           = \"PD NUCLEI USER CERTIFICATE\"\n\tPrivateKeyType     = \"PD NUCLEI USER PRIVATE KEY\"\n\tCertFilename       = \"nuclei-user.crt\"\n\tPrivateKeyFilename = \"nuclei-user-private-key.pem\"\n\tCertEnvVarName     = \"NUCLEI_USER_CERTIFICATE\"\n\tPrivateKeyEnvName  = \"NUCLEI_USER_PRIVATE_KEY\"\n)\n\nvar (\n\tErrNoCertificate   = fmt.Errorf(\"nuclei user certificate not found\")\n\tErrNoPrivateKey    = fmt.Errorf(\"nuclei user private key not found\")\n\tSkipGeneratingKeys = false\n\tnoUserPassphrase   = false\n)\n\n// KeyHandler handles the key generation and management\n// of signer public and private keys\ntype KeyHandler struct {\n\tUserCert    []byte\n\tPrivateKey  []byte\n\tcert        *x509.Certificate\n\tecdsaPubKey *ecdsa.PublicKey\n\tecdsaKey    *ecdsa.PrivateKey\n}\n\n// ReadCert reads the user certificate from environment variable or given directory\nfunc (k *KeyHandler) ReadCert(envName, dir string) error {\n\t// read from env","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/templates/signer/handler.go#L15-L51","documentation":"Error \"nuclei user certificate not found\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/templates/signer/handler.go:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}