OpenSSL Step By Step Tutorial | How to Generate Keys, Certificates & CSR Using OpenSSL

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 171

  • @lorenzomagni9200
    @lorenzomagni9200 3 роки тому +4

    wow everything worked so flawlessly, you're a hero

  • @rfrancoi
    @rfrancoi Рік тому +2

    Excellent video Sir. Thank you; it is greatly appreciated.

  • @azontoboynate
    @azontoboynate 2 роки тому +2

    Lot's of CSR videos but this one was perfect! Thank you!

  • @BirdFinder100
    @BirdFinder100 3 роки тому +7

    Excellent demonstration sir. Thank you for making this clear to me.

  • @TheL337trance
    @TheL337trance 3 роки тому +5

    I needed someone to explain it like this for so long. Thank you man.

  • @morningmotivation4745
    @morningmotivation4745 Рік тому

    It cleared all my doubts..nicely explained..thanks for the amazing video..!

  • @bobbiecorner
    @bobbiecorner 2 роки тому

    Great video ... I was confused before watching this, now I understand much better. Thanks.

  • @sachinmarawar7617
    @sachinmarawar7617 Рік тому

    Very well demonstrated key-pair generation, extracting public key, CSR and self-signed certificate. Great work!

  • @shanrk2972
    @shanrk2972 3 роки тому +1

    Short video, simple to understand. WOW!!! Thank you

  • @michaelareay1037
    @michaelareay1037 3 роки тому +11

    Good job done. Very clearly explained and everything was right to the point and it held my attention. Everyone should do their training videos like this.

  • @florinbujoreanu1020
    @florinbujoreanu1020 4 місяці тому

    BRAVO! thank you for the clear and practical explanation!

  • @ad1450
    @ad1450 3 роки тому

    Thanks a lot .Love from India

  • @mwitschi69
    @mwitschi69 3 роки тому +1

    Just created my first key, ever. Now going to implement this....

  • @raufmedappil
    @raufmedappil 3 роки тому +3

    Thanks a lot bro..I was looking for a simple but explanatory tutorial on how certificates work..this video helped me to understand a lot

  • @nagasai6668
    @nagasai6668 2 місяці тому +1

    Hi Sir, what you said was awesome and great informative and I'll suggest few and give knowledge on this sir ❤🙏

  • @lkinsmusic
    @lkinsmusic 2 роки тому

    Hello when i use command for create csr file. This file is not shown when type dir command
    it is not created. Why this issue happened ?

  • @IamKhan8010
    @IamKhan8010 3 роки тому +1

    Awesome. This is what I needed this morning.

  • @mazbahurrahman6787
    @mazbahurrahman6787 3 роки тому

    Worked for me, best video on openssl

  • @demontagemontage
    @demontagemontage 3 роки тому +1

    how to creat command "CLS" clear screen in this toolkit , or same equivalent???????????????????????

  • @santhoshnagamalla4302
    @santhoshnagamalla4302 Рік тому

    Awesome explanation bro !!!

  • @gadhoodhle
    @gadhoodhle 2 роки тому

    Very useful - clear and consise. Thanks for sharing.

  • @ankursingh7505
    @ankursingh7505 Рік тому +1

    Great Video, Very clearly explained about CA, CSR.
    I have a question:
    When we are opening the //https connection using self signed CA certificate getting some warnings on //https web page. May I know the reason?
    Kindly, respond.
    Thanks

    • @TutorialsPediaVideos
      @TutorialsPediaVideos  Рік тому

      Dear Ankur,
      Thanks for the kind feedback.
      In case of a self-signed certificate, we get SSL warning because chain of trust is not identified by the browser. Browser trusts only CA signed certificates (unless you explicitly add your certificate in the trust store).
      I will recommend you to watch my other video where I explained SSL chain of trust in much detail.

  • @dancewitharun
    @dancewitharun 3 роки тому +1

    Clear explanation to the point. Thanks buddy. Keep uploading more videos like this.

  • @okey1317
    @okey1317 2 роки тому

    6:00 Why did you pass the initial key file? .. shouldnt we pass the public key file?

  • @madhamsettypreetham1261
    @madhamsettypreetham1261 2 роки тому

    Thanks for the clear explanation

  • @thanmayanaik2002
    @thanmayanaik2002 3 роки тому +1

    Thanks a lot for the precise, and informative video.

  • @ganeshraj5328
    @ganeshraj5328 2 роки тому

    Thankyou. Video was very clear

  • @yv9296
    @yv9296 3 роки тому +2

    excellent video. thank you.

  • @HistoryChannel80
    @HistoryChannel80 2 роки тому

    Thank you very much. Was thinking I will never get it with this csr.

  • @asuteles201
    @asuteles201 3 роки тому +4

    Hi sir,
    I want to configure certificate based authentication, it requirement
    1.CA,
    2.User Certificate,
    3.server certificate.
    What should I do, whether is same with you do?

  • @Marek-MAROGO
    @Marek-MAROGO 4 місяці тому

    Thanks from Poland!👍

  • @karthickd7
    @karthickd7 2 роки тому

    Command to create self signed certificate with csr and private key is not working shows x509: Use -help for summary. any idea?

  • @User-nq9ee
    @User-nq9ee 3 роки тому +2

    all those who are having error like me
    The only thing that worked for me in this situation was the self-created openssl.cnf file.
    Here are the basics needed for this exercise (edit as needed):
    #
    # OpenSSL configuration file.
    #
    # Establish working directory.
    @/c:\Users\User\Desktop\test
    dir = .
    [ ca ]
    default_ca = CA_default
    [ CA_default ]
    serial = $dir/serial
    database = $dir/certindex.txt
    new_certs_dir = $dir/certs
    certificate = $dir/cacert.pem
    private_key = $dir/private/cakey.pem
    default_days = 365
    default_md = md5
    preserve = no
    email_in_dn = no
    nameopt = default_ca
    certopt = default_ca
    policy = policy_match
    [ policy_match ]
    countryName = match
    stateOrProvinceName = match
    organizationName = match
    organizationalUnitName = optional
    commonName = supplied
    emailAddress = optional
    [ req ]
    default_bits = 1024 # Size of keys
    default_keyfile = key.pem # name of generated keys
    default_md = md5 # message digest algorithm
    string_mask = nombstr # permitted characters
    distinguished_name = req_distinguished_name
    req_extensions = v3_req
    [ req_distinguished_name ]
    # Variable name Prompt string
    #------------------------- ----------------------------------
    0.organizationName = Organization Name (company)
    organizationalUnitName = Organizational Unit Name (department, division)
    emailAddress = Email Address
    emailAddress_max = 40
    localityName = Locality Name (city, district)
    stateOrProvinceName = State or Province Name (full name)
    countryName = Country Name (2 letter code)
    countryName_min = 2
    countryName_max = 2
    commonName = Common Name (hostname, IP, or your name)
    commonName_max = 64
    # Default values for the above, for consistency and less typing.
    # Variable name Value
    #------------------------ ------------------------------
    0.organizationName_default = My Company
    localityName_default = My Town
    stateOrProvinceName_default = State or Providence
    countryName_default = US
    [ v3_ca ]
    basicConstraints = CA:TRUE
    subjectKeyIdentifier = hash
    authorityKeyIdentifier = keyid:always,issuer:always
    [ v3_req ]
    basicConstraints = CA:FALSE
    subjectKeyIdentifier = hash
    # copy till here
    now save this file and run the command as
    openssl req -new -key tutorialspedia.key -out tutorialspedia.csr -config openssl.cnf
    hope this will work for you :)

  • @vivekprajapati7911
    @vivekprajapati7911 4 роки тому +1

    really great way of teaching thanks.

  • @travelwalk539
    @travelwalk539 3 роки тому +1

    Good explanation , keep it up

  • @noorullashaik1784
    @noorullashaik1784 2 роки тому

    Good job clearly explained

  • @brajeshpatel2810
    @brajeshpatel2810 3 роки тому

    superb knowledge ... my friend .. keep sharing it..

  • @rs-tarxvfz
    @rs-tarxvfz 4 роки тому +1

    5:40 WHY DO I have to provide my *Private key* to the *CA Authority* for CSR , This seems to be wrong to me. Please explain.

    • @TutorialsPediaVideos
      @TutorialsPediaVideos  4 роки тому

      I believe you misunderstood the point. I explained in the video that CSR is shared with the CA.

    • @davidcrealogix9435
      @davidcrealogix9435 4 роки тому

      only for creation of the csr file the private key is needed. in the csr file itself only the public key is contained.
      en.wikipedia.org/wiki/Certificate_signing_request

    • @subhakardondapati8340
      @subhakardondapati8340 3 роки тому +1

      @@TutorialsPediaVideos I see in the command you used to generate cert, you used private key... is the public key need to be given? please clarify

    • @pabloandrade339
      @pabloandrade339 3 роки тому +1

      @@subhakardondapati8340 you are correct. i think the video is using the entire key pair file instead of the public key to generate the CSR which in turn will go to the CA. This is a very important piece of information that will kill you in any test or interview.

  • @ravikalkote1729
    @ravikalkote1729 2 роки тому

    Great video.. all commands worked for me...thanks...one query how to add critical extensions using your commands?

  • @kurunari5754
    @kurunari5754 3 роки тому +1

    please help 9:50
    when i tried to self-sign i got the following output instead of 'Signature Ok'
    output:
    openssl x509 -in friday.csr -out friday.crt -req - signkey friday.key -days 365
    x509: Use -help for summary.
    everything until that is clear, someone pls help fast.

    • @kurunari5754
      @kurunari5754 3 роки тому

      i'm unable to generate tha crt file , pls help

  • @dennisgarber
    @dennisgarber 3 роки тому +1

    Great video, but you now have weird files on your computer. What do you do with these weird files. Do I ftp to my server, control panel, do I need to go to ican or other ssl org to upload them?

  • @LaeeqKhan01
    @LaeeqKhan01 2 роки тому

    Very nice job.
    Please add info on how to create "non-self-signed certificates". Meaning certificate verifying some other public key. Thanks

  • @gildonghong563
    @gildonghong563 3 роки тому

    Thank you bro!!
    you are save my life!!

  • @raghuZanne
    @raghuZanne 2 роки тому

    Awesome explanation. Thank you!

  • @andresfd89
    @andresfd89 2 роки тому

    Thank you very much, very clear and to the point!

  • @ajaiyapandey5058
    @ajaiyapandey5058 2 роки тому

    Thanks for the great tutorials. How I securely push these key (private & cer) in jks file ?

  • @amirkian1181
    @amirkian1181 Рік тому

    Can you tell me how we can extract the private key from the key pair, as well as the public key?

  • @sudhanshutiwari7916
    @sudhanshutiwari7916 2 роки тому

    how can we stop the stdin for step 3 like country name etc, and provide through argparser ?

  • @georgebenjamin6632
    @georgebenjamin6632 3 роки тому

    Well done for this nice video

  • @saikrishnamerugu6118
    @saikrishnamerugu6118 11 місяців тому

    executing openssl command to generate key pair using "openssl genrsa -out keyfile.key 2048" but facing an error "genrsa: Can't open "keyfile.key" for writing, Permission denied". Could you guide me hot to fix this

  • @jurijus01
    @jurijus01 4 роки тому +1

    Thanks a lot!!! Exactly what I was looking for

  • @jakobyaro6428
    @jakobyaro6428 Рік тому

    thanks bro, you are the best

  • @AlHoussem
    @AlHoussem 3 роки тому +1

    Great Tutorial, Thanks

  • @SupraRyu
    @SupraRyu 3 роки тому +1

    Great job!

  • @vipul6304
    @vipul6304 2 роки тому +1

    Hi, how can get my Certicate Signed by 'CA' instead of Self-Signed?

    • @TutorialsPediaVideos
      @TutorialsPediaVideos  2 роки тому

      Hi Vipul,
      Once you have created CSR, in order to get it signed by a CA, you need to share your CSR with a CA for the subsequent steps.

    • @vipul6304
      @vipul6304 2 роки тому

      @@TutorialsPediaVideos thanks, is there a free CA that you know?

  • @maksimsvystun799
    @maksimsvystun799 2 роки тому

    Thanks! You helped a lot

  • @SherinSunny-rj3py
    @SherinSunny-rj3py 3 роки тому

    i am getting an error saying warning can't open config file: C:/OpenSSL/openssl.cnf please do help

  • @engrkn
    @engrkn 3 роки тому +1

    Good job mate :) PK/ISB at last someone from PK

  • @kishoreyadav9317
    @kishoreyadav9317 4 роки тому +2

    I am getting Can't open -testauto.key for reading, No such file or directory error any idea ?? followed the same steps

  • @shwetasugurmath5390
    @shwetasugurmath5390 3 роки тому

    If I want to create SSL certificates on cluster having 4-5 nodes, can we have same crt copied to all hosts?

  • @Nyemaster
    @Nyemaster 4 роки тому +1

    Thanks - I had all this confused. You helped a lot. Now how do I get this into Windows 10?

    • @TutorialsPediaVideos
      @TutorialsPediaVideos  4 роки тому

      Thanks Dave for your feedback. You can download windows version of openssl and use it in your machine. I myself created this tutorial in Windows 10.

    • @mubasherchaudhary5223
      @mubasherchaudhary5223 4 роки тому

      I also had a problem with installing it on windows but then I found this tutorial helpful
      ua-cam.com/video/YNKUpNpM0Q0/v-deo.html&ab_channel=TechDeepDiveTechDeepDive

  • @mark-theeverydayimagineer6163
    @mark-theeverydayimagineer6163 4 роки тому +1

    Great presentation - thanks

  • @electrotsmishar
    @electrotsmishar 4 роки тому +1

    very helpful. thank you

  • @jibrankhan499
    @jibrankhan499 3 роки тому +1

    Job saving info for me.

  • @AdityaKaveri
    @AdityaKaveri 2 місяці тому

    Its asking me - Enter pass phrase for domain. What is the pass phrase??

  • @sampande45
    @sampande45 Рік тому

    How to solve the invalid digest for sha1 error while creating csr

  • @EndlessTech
    @EndlessTech 2 роки тому

    Very informative 😊👏

  • @6962943
    @6962943 4 роки тому

    wow thank you explained so clearly

  • @ceeeskayaar2281
    @ceeeskayaar2281 3 роки тому

    info given in this video was insufficient to running localhost with https using openssl certificate. It ended with net::cert_common_name_invalid error in chrome on windows and also with hhtps strickedout in url with no green lock in browser address bar. I appreciate further help to fix the error...

  • @SureshBabu-of5jh
    @SureshBabu-of5jh 3 роки тому

    In this case can we generate public keys and match with public keys being used by differenrt companies?

  • @AlianeAbdelouahab
    @AlianeAbdelouahab 3 роки тому

    this is just perfect, simple, effective !

  • @DeekshiWithDaddy
    @DeekshiWithDaddy Рік тому

    hi bro, can you check my error''Unable to load config info from /usr/local/ssl/openssl.cnf''

  • @mta5948
    @mta5948 3 роки тому

    good video, very nicely explained. thanks

  • @ruchigarg7788
    @ruchigarg7788 4 роки тому +1

    Thanks, Its really helpful.

  • @kumarmanish9046
    @kumarmanish9046 Рік тому

    3:25 you have not generated key PAIR right? You have just created the private key. Where is the public key?

  • @bharathiVJK
    @bharathiVJK Рік тому

    Hisir.
    How do one vedio on how to create csr repo

  • @KeremPARLAKGUMUS-uc4xb
    @KeremPARLAKGUMUS-uc4xb 3 роки тому

    thank you very much, it was very useful

  • @happyverma91
    @happyverma91 2 роки тому

    Can I deploy certificate on godaddy domain?

  • @unemployedcse3514
    @unemployedcse3514 Рік тому

    Awesome 😍

  • @jiten6mar
    @jiten6mar Рік тому

    Nice video in detail. I have one question in terms of renewal. To renew the existing CA signed certificate, is it correct to give old CSR (CSR generated to get CA signed initially). Is there any validity for key pair and CSR generated?

  • @selvendranbtech
    @selvendranbtech 3 роки тому +2

    Good explanation in detail. I have one query in terms of renewal. To renew the existing CA signed certificate, is it correct to give old CSR (CSR generated to get CA signed initially). Is there any validity for key pair and CSR generated?

  • @My_Name_Is_Prashant
    @My_Name_Is_Prashant 2 роки тому

    wow..
    It helped me a lot

  • @gianlucavenditti4109
    @gianlucavenditti4109 2 роки тому

    Good job! Thank you!

  • @fanig1458
    @fanig1458 3 роки тому

    How should I verify that same csr for the crt that was created

  • @amj7573
    @amj7573 3 роки тому

    Very nice video. Thank you very much. How to create certificate with encryption and does the server also should have a certificate with encrypted key? And also can we use Portecle to generate certificates with encrypted key for linux?

  • @bhaveshdwivedi3549
    @bhaveshdwivedi3549 2 роки тому

    CAn you create an video about self signing code signing certificate

  • @sharadregoti7742
    @sharadregoti7742 3 роки тому

    Can you also make a video on certificate chaining / Intermediate CAS

  • @enriquecaballero15
    @enriquecaballero15 4 роки тому +1

    great tutorial, thank you!

  • @mmusthafa1567
    @mmusthafa1567 2 роки тому

    how can use this ssl certification...how use for get a localhost in https

  • @venigallashanmukha320
    @venigallashanmukha320 3 роки тому

    how can i remove or rekove the same certificate ??

  • @Jennn
    @Jennn 2 роки тому

    Thank you So Much Sir

  • @jai7853
    @jai7853 4 роки тому

    Hello,
    I created a ssl certificate but i dont want to put a specific CN name, rather just a * wildcard because in the server side hostname will keep changing periodically so i dont want to generate certificate everytime. Whatever the hostname it be the client can connect . Is there a way around ??

    • @TutorialsPediaVideos
      @TutorialsPediaVideos  4 роки тому +1

      Dear Jai,
      You can use *.host.com and this way your certificate will be valid for that domain and any subdomains but having only * without even a mention of a host at all doesn't make sense for any real production environment.

    • @jai7853
      @jai7853 4 роки тому

      @@TutorialsPediaVideos thank you for your quick response. Appreciate it.

    • @jai7853
      @jai7853 4 роки тому

      Hello Again,
      I dont know if you have time for this but i have a situation and trying to find a solution for it since some days but no positive result yet. I will be very grateful if any insights can be provided by you.
      I have a server with serverCertificates and a client with its own certificate. I am potraying as a CA. I am working with RPi. When i set CN in the serverCertificate as 'raspberrypi' and in the client hostname as 'raspberrypi' for sending https.request, I get desired result all looks perfect. Problem is instead of CN i want to use 'subjectAltName' in my certificate so that i can also nominate an IP as my [alt_names]. I created the certificate with alt_names getting help from some website but when i send client request to the server from a remote machine connected to the same network i get an error stating hostname is invalid. Below is the error :
      Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: IP: 10.10.10.10 is not in the cert's list:
      at Object.checkServerIdentity (tls.js:287:12)
      at TLSSocket.onConnectSecure (_tls_wrap.js:1511:27)
      at TLSSocket.emit (events.js:315:20)
      at TLSSocket._finishInit (_tls_wrap.js:936:8)
      at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12) {
      reason: "IP: 10.10.10.10 is not in the cert's list: ",
      host: '10.10.10.10',
      If you want the config i used for creating certificate i can also share that. Just let me know.
      Any help from you ??

  • @icanada4
    @icanada4 Рік тому

    Thank you!

  • @edalee5935
    @edalee5935 4 роки тому +1

    It's very helpful~!

  • @jamely15
    @jamely15 4 роки тому

    Nice explanation ! Thank you !

  • @Mocka-yf4ez
    @Mocka-yf4ez 3 роки тому +1

    awsome!!!!!!

  • @AQEELAbdulmajeed-dh1ti
    @AQEELAbdulmajeed-dh1ti 3 роки тому +1

    I Like it.

  • @dovelrob
    @dovelrob 4 роки тому +1

    thanks for your help bro

  • @pabloandrade339
    @pabloandrade339 3 роки тому +11

    The video is good but you have a major mistake. I think the video is using the entire key pair file instead of the public key to generate the CSR which in turn will go to the CA. This is a very important piece of information that will kill you in any test or interview. The steps are correct but the files being used are wrong. The CSR should be created only with the public key file, the CA will generate a certificate. After verification, the CA sends you a signed digital certificate that contains your distinguished name, your public key, the CA's distinguished name, and the signature of the certificate authority. You store this signed certificate in your key database.

    • @LeXT89
      @LeXT89 2 роки тому +1

      Are you serious ? "CSRs are signed using the private key to prevent tampering in transit to the CA.

    • @flymoracer
      @flymoracer Рік тому

      @@LeXT89 That’s correct. The private key file, which also contains the public key information, is used to sign the CSR. The CSR does not contain the private key. It isn't necessary to extract the public key to create a CSR. OpenSSL supports the creation of the CSR directly from the private key file.

  • @techworld-pythonandsalesforcea
    @techworld-pythonandsalesforcea 11 місяців тому

    Unable to load config info from /usr/local/ssl/openssl.cnf getting this error for csr