Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 543207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:31:38+00:00 2026-05-13T10:31:38+00:00

I have a little escript file that connects to a node and does some

  • 0

I have a little escript file that connects to a node and does some rpc calls and stuff…

It works fine for short or longnames but relies on standard http comms for distributed Erlang.

I would like to use it but with https/SSL for distribution.

To start a ‘normal’ Erlang system with SSL you have to pass in the various flags to tell Erlang to run that way, as the documentation suggests:

$ ERL_FLAGS="-boot \"/home/me/ssl/start_ssl\" -proto_dist inet_ssl 
  -ssl_dist_opt client_certfile \"/home/me/ssl/erlclient.pem\" 
  -ssl_dist_opt server_certfile \"/home/me/ssl/erlserver.pem\" 
  -ssl_dist_opt verify 1 -ssl_dist_opt depth 1"
$ export ERL_FLAGS
$ erl -sname ssl_test

This replaces the default distribution mechanism (inet_tcp_dist) with the ssl one (inet_ssl_dist).

escript runs an erlang file as a shell scripting file.

My questions are:

  • is it possible to get the Erlang ‘environment’ in which escript runs to use the secure distribution mechanism instead of the default one?
  • and if so, how would I do it?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:31:38+00:00Added an answer on May 13, 2026 at 10:31 am

    You don’t have to set these flags via the environment, you can also pass them directly to erl, see ch. 1.4 here. erl flags can be passed to escript via the %%! argument line.


    z.escript

    #!/usr/bin/env escript
    %%! -boot start_ssl -proto_dist inet_ssl -ssl_dist_opt client_certfile /home/me/ssl/erlclient.pem -ssl_dist_opt server_certfile /home/me/ssl/erlserver.pem -ssl_dist_opt verify 1 -ssl_dist_opt depth 1
    main(_) ->
        io:format("~p~n", [init:get_arguments()]).
    

    zed@zed:~$ ./z.escript 
    [{root,["/opt/erlang-R13B03/lib/erlang"]},
     {progname,["erl"]},
     {home,["/home/zed"]},
     {boot,["start_clean"]},
     {noshell,[]},
     {boot,["start_ssl"]},
     {proto_dist,["inet_ssl"]},
     {ssl_dist_opt,["client_certfile","/home/me/ssl/erlclient.pem"]},
     {ssl_dist_opt,["server_certfile","/home/me/ssl/erlserver.pem"]},
     {ssl_dist_opt,["verify","1"]},
     {ssl_dist_opt,["depth","1"]}]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have little problem, I implement my own membership provider and it works fine.
I have little unusual problem to solve. I need some hint or links to
I have little JAVA coding experience (some classes at university) but none in the
I have little Silverlight app that needs to make queries to server, is it
I have little problem. I can't use AcceptVerb.Get on some ASP.NET MVC actions because
I have little notification divs that should appear above the navigation. I tried other
Okay since I have little experience with this stuff and the Facebook documentation is
I have little working knowledge of python. I know that there is something called
I have little pdf (or txt, odt, doc) file to be store in Postgres
Right now I'm trying make some browser based game. But I have little questions.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.