self signed certificate in certificate chain error

Patel, Rohan 5 Reputation points
2023-05-12T02:14:32.7433333+00:00

I have a local project setup for Azure functions. I have 4 azure functions on my local. 1 HTTP Trigger, 2 Timer Trigger, 1 service bus trigger. When I am trying to deploy them via VSCODE I am getting reason: self signed certificate in certificate chain error.

Environment: NodeJS.

All functions are built using v3 programming model using Typescript.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,610 questions
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
934 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. VasimTamboli 4,775 Reputation points
    2023-05-12T03:21:58.75+00:00

    The error message "self signed certificate in certificate chain" typically occurs when the SSL certificate used by the server is self-signed or not trusted by the client. To resolve this issue when deploying your Azure functions from Visual Studio Code, you can try the following steps:

    Disable SSL Verification: You can disable SSL verification in the Azure Functions extension settings within Visual Studio Code. Follow these steps:

    • Open the command palette (Ctrl+Shift+P or Cmd+Shift+P).
    • Type "Azure Functions: Open Settings" and select it.
    • Look for the setting "azureFunctions.deploy.restrictToLocalEmulatorCerts" and set it to false.
    • Retry deploying your functions.

    Trust the Self-Signed Certificate: If disabling SSL verification doesn't resolve the issue, you can try manually trusting the self-signed certificate. Follow these steps:

    • Open the Azure Functions Core Tools command prompt.
    • Run the following command to trust the certificate:
    goCopy code
    func ssl trust
    
    • Retry deploying your functions.

    Use a Valid SSL Certificate: Consider using a valid SSL certificate issued by a trusted Certificate Authority (CA) for your local development environment. This ensures that the certificate is recognized and trusted by your deployment process.

    By following these steps, you should be able to resolve the "self signed certificate in certificate chain" error and successfully deploy your Azure functions from Visual Studio Code.

    1 person found this answer helpful.
    0 comments No comments