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

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ส.ค. 2024
  • OpenSSL step by step tutorial explaining how to generate key pair, how to export public key using openssl commands, how to create CSR using openSSL and how to generate self signed certificate using Open SSL command line tool.
    To dowload openSSL visit: www.openssl.org/
    To learn how to use Java Key Tool to generate self signed certificates: • How to Generate Key St...
    To learn how to use Portecle to generate self signed certificates: • Generate Self Signed C...
    To learn difference between one-way and two-way SSL: • How One Way and Two Wa...

ความคิดเห็น • 169

  • @florinbujoreanu1020
    @florinbujoreanu1020 26 วันที่ผ่านมา

    BRAVO! thank you for the clear and practical explanation!

  • @Marek-MAROGO
    @Marek-MAROGO 19 วันที่ผ่านมา

    Thanks from Poland!👍

  • @lorenzomagni9200
    @lorenzomagni9200 3 ปีที่แล้ว +4

    wow everything worked so flawlessly, you're a hero

  • @azontoboynate
    @azontoboynate ปีที่แล้ว +2

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

  • @TheL337trance
    @TheL337trance 2 ปีที่แล้ว +5

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

  • @rfrancoi
    @rfrancoi 9 หลายเดือนก่อน +1

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

  • @sachinmarawar7617
    @sachinmarawar7617 ปีที่แล้ว

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

  • @BirdFinder100
    @BirdFinder100 3 ปีที่แล้ว +7

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

  • @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.

  • @morningmotivation4745
    @morningmotivation4745 11 หลายเดือนก่อน

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

  • @shanrk2972
    @shanrk2972 3 ปีที่แล้ว +1

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

  • @bobbiecorner
    @bobbiecorner 2 ปีที่แล้ว

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

  • @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

  • @mwitschi69
    @mwitschi69 3 ปีที่แล้ว +1

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

  • @ImranKhanVlogs8010
    @ImranKhanVlogs8010 2 ปีที่แล้ว +1

    Awesome. This is what I needed this morning.

  • @ad1450
    @ad1450 3 ปีที่แล้ว

    Thanks a lot .Love from India

  • @jakobyaro6428
    @jakobyaro6428 10 หลายเดือนก่อน

    thanks bro, you are the best

  • @dancewitharun
    @dancewitharun 3 ปีที่แล้ว +1

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

  • @yv9296
    @yv9296 3 ปีที่แล้ว +2

    excellent video. thank you.

  • @mazbahurrahman6787
    @mazbahurrahman6787 3 ปีที่แล้ว

    Worked for me, best video on openssl

  • @thanmayanaik2002
    @thanmayanaik2002 2 ปีที่แล้ว +1

    Thanks a lot for the precise, and informative video.

  • @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.

  • @HistoryChannel80
    @HistoryChannel80 2 ปีที่แล้ว

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

  • @ganeshraj5328
    @ganeshraj5328 2 ปีที่แล้ว

    Thankyou. Video was very clear

  • @santhoshnagamalla4302
    @santhoshnagamalla4302 ปีที่แล้ว

    Awesome explanation bro !!!

  • @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

  • @travelwalk539
    @travelwalk539 3 ปีที่แล้ว +1

    Good explanation , keep it up

  • @ravikalkote1729
    @ravikalkote1729 2 ปีที่แล้ว

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

  • @AQEELAbdulmajeed-dh1ti
    @AQEELAbdulmajeed-dh1ti 3 ปีที่แล้ว +1

    I Like it.

  • @brajeshpatel2810
    @brajeshpatel2810 3 ปีที่แล้ว

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

  • @madhamsettypreetham1261
    @madhamsettypreetham1261 2 ปีที่แล้ว

    Thanks for the clear explanation

  • @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 :)

  • @andresfd89
    @andresfd89 2 ปีที่แล้ว

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

  • @icanada4
    @icanada4 ปีที่แล้ว

    Thank you!

  • @datonernegen
    @datonernegen ปีที่แล้ว

    Thank you, really helped me!

  • @raghuZanne
    @raghuZanne 2 ปีที่แล้ว

    Awesome explanation. Thank you!

  • @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?

  • @vivekprajapati7911
    @vivekprajapati7911 4 ปีที่แล้ว +1

    really great way of teaching thanks.

  • @gildonghong563
    @gildonghong563 3 ปีที่แล้ว

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

  • @jurijus01
    @jurijus01 3 ปีที่แล้ว +1

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

  • @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?

  • @demontagemontage
    @demontagemontage 3 ปีที่แล้ว +1

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

  • @engrkn
    @engrkn 3 ปีที่แล้ว +1

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

    • @izhaanabid5312
      @izhaanabid5312 2 ปีที่แล้ว

      So happy to see that. Subbed him.

  • @noorullashaik1784
    @noorullashaik1784 2 ปีที่แล้ว

    Good job clearly explained

  • @jibrankhan499
    @jibrankhan499 3 ปีที่แล้ว +1

    Job saving info for me.

  • @AlHoussem
    @AlHoussem 3 ปีที่แล้ว +1

    Great Tutorial, Thanks

  • @rupeshgawas4905
    @rupeshgawas4905 ปีที่แล้ว

    thank you bhai

  • @georgebenjamin6632
    @georgebenjamin6632 2 ปีที่แล้ว

    Well done for this nice video

  • @unemployedcse3514
    @unemployedcse3514 ปีที่แล้ว

    Awesome 😍

  • @cheers1963
    @cheers1963 ปีที่แล้ว

    Thank you sir

  • @electrotsmishar
    @electrotsmishar 3 ปีที่แล้ว +1

    very helpful. thank you

  • @SupraRyu
    @SupraRyu 2 ปีที่แล้ว +1

    Great job!

  • @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?

  • @pabloandrade339
    @pabloandrade339 3 ปีที่แล้ว +12

    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 ปีที่แล้ว +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.

  • @AlianeAbdelouahab
    @AlianeAbdelouahab 3 ปีที่แล้ว

    this is just perfect, simple, effective !

  • @mta5948
    @mta5948 3 ปีที่แล้ว

    good video, very nicely explained. thanks

  • @KeremPARLAKGUMUS-uc4xb
    @KeremPARLAKGUMUS-uc4xb 3 ปีที่แล้ว

    thank you very much, it was very useful

  • @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?

  • @ruchigarg7788
    @ruchigarg7788 3 ปีที่แล้ว +1

    Thanks, Its really helpful.

  • @ajaiyapandey5058
    @ajaiyapandey5058 ปีที่แล้ว

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

  • @amj7573
    @amj7573 2 ปีที่แล้ว

    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?

  • @6962943
    @6962943 3 ปีที่แล้ว

    wow thank you explained so clearly

  • @EndlessTech
    @EndlessTech ปีที่แล้ว

    Very informative 😊👏

  • @mark-theeverydayimagineer6163
    @mark-theeverydayimagineer6163 4 ปีที่แล้ว +1

    Great presentation - thanks

  • @My_Name_Is_Prashant
    @My_Name_Is_Prashant 2 ปีที่แล้ว

    wow..
    It helped me a lot

  • @gianlucavenditti4109
    @gianlucavenditti4109 2 ปีที่แล้ว

    Good job! Thank you!

  • @itigloostudio957
    @itigloostudio957 2 ปีที่แล้ว

    Thanks.

  • @Jennn
    @Jennn 2 ปีที่แล้ว

    Thank you So Much Sir

  • @enriquecaballero15
    @enriquecaballero15 3 ปีที่แล้ว +1

    great tutorial, thank you!

  • @Nyemaster
    @Nyemaster 3 ปีที่แล้ว +1

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

    • @TutorialsPediaVideos
      @TutorialsPediaVideos  3 ปีที่แล้ว

      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 3 ปีที่แล้ว

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

  • @EamoAmin
    @EamoAmin 3 ปีที่แล้ว +1

    Thank you

  • @namanbajpai6107
    @namanbajpai6107 2 ปีที่แล้ว

    Thanks ..

  • @amirkian1181
    @amirkian1181 ปีที่แล้ว

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

  • @dovelrob
    @dovelrob 4 ปีที่แล้ว +1

    thanks for your help bro

  • @edalee5935
    @edalee5935 3 ปีที่แล้ว +1

    It's very helpful~!

  • @bhaveshdwivedi3549
    @bhaveshdwivedi3549 2 ปีที่แล้ว

    CAn you create an video about self signing code signing certificate

  • @Mocka-yf4ez
    @Mocka-yf4ez 2 ปีที่แล้ว +1

    awsome!!!!!!

  • @bharathikommu9016
    @bharathikommu9016 ปีที่แล้ว

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

  • @jamely15
    @jamely15 4 ปีที่แล้ว

    Nice explanation ! Thank you !

  • @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 ?

  • @sharadregoti7742
    @sharadregoti7742 3 ปีที่แล้ว

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

  • @okey1317
    @okey1317 ปีที่แล้ว

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

  • @SureshBabu-of5jh
    @SureshBabu-of5jh 3 ปีที่แล้ว

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

  • @kishoreyadav9317
    @kishoreyadav9317 3 ปีที่แล้ว +2

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

  • @carolinazubieta1349
    @carolinazubieta1349 ปีที่แล้ว

    super

  • @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?

  • @sudhanshutiwari7916
    @sudhanshutiwari7916 2 ปีที่แล้ว

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

  • @shwetasugurmath5390
    @shwetasugurmath5390 2 ปีที่แล้ว

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

  • @JDavidFIG
    @JDavidFIG 3 ปีที่แล้ว

    Good job friend!!

  • @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?

  • @sampande45
    @sampande45 ปีที่แล้ว

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

  • @kumarmanish9046
    @kumarmanish9046 ปีที่แล้ว

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

  • @My_Name_Is_Prashant
    @My_Name_Is_Prashant 2 ปีที่แล้ว

    where do we need self signed certificate in real world scenario...

  • @fanig1458
    @fanig1458 3 ปีที่แล้ว

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

  • @vinaygowda7413
    @vinaygowda7413 3 ปีที่แล้ว

    so neat and clear. Exactly wt I need. Thanks

  • @ceeeskayaar2281
    @ceeeskayaar2281 2 ปีที่แล้ว

    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...

  • @SherinSunny-rj3py
    @SherinSunny-rj3py 3 ปีที่แล้ว

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

  • @jackpitts5561
    @jackpitts5561 3 ปีที่แล้ว +2

    too coder-centric, start by definiing the problem using vitual aides. What is happening from a helicopter view, what are the keys for, why are they needed, who holds which keys and why. etc....

    • @TutorialsPediaVideos
      @TutorialsPediaVideos  3 ปีที่แล้ว +2

      Dear Jack,
      Thanks for your feedback. This tutorial is mainly covering opnssl commands from technical point of view.
      For functional use cases, will create another video to address your concerns :)

  • @saikrishnamerugu6118
    @saikrishnamerugu6118 7 หลายเดือนก่อน

    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