You are on page 1of 2

4/2/2014

https://www.openssl.org/docs/HOWTO/certificates.txt

< D R A F T ! > H O W T Oc e r t i f i c a t e s 1 .I n t r o d u c t i o n H o wy o uh a n d l ec e r t i f i c a t e sd e p e n dag r e a td e a lo nw h a ty o u rr o l ei s . Y o u rr o l ec a nb eo n eo rs e v e r a lo f : -U s e ro fs o m ec l i e n ts o f t w a r e -U s e ro fs o m es e r v e rs o f t w a r e -C e r t i f i c a t ea u t h o r i t y T h i sf i l ei sf o ru s e r sw h ow i s ht og e tac e r t i f i c a t eo ft h e i ro w n . C e r t i f i c a t ea u t h o r i t i e ss h o u l dr e a dc a . t x t . I na l lt h ec a s e ss h o w nb e l o w ,t h es t a n d a r dc o n f i g u r a t i o nf i l e ,a s c o m p i l e di n t oo p e n s s l ,w i l lb eu s e d . Y o um a yf i n di ti n/ e t c / , / u s r / l o c a l / s s l /o rs o m e w h e r ee l s e . T h en a m ei so p e n s s l . c n f ,a n d i sb e t t e rd e s c r i b e di na n o t h e rH O W T O< c o n f i g . t x t ? > . I fy o uw a n tt o u s ead i f f e r e n tc o n f i g u r a t i o nf i l e ,u s et h ea r g u m e n t' c o n f i g{ f i l e } ' w i t ht h ec o m m a n ds h o w nb e l o w .

2 .R e l a t i o n s h i pw i t hk e y s C e r t i f i c a t e sa r er e l a t e dt op u b l i ck e yc r y p t o g r a p h yb yc o n t a i n i n ga p u b l i ck e y . T ob eu s e f u l ,t h e r em u s tb eac o r r e s p o n d i n gp r i v a t ek e y s o m e w h e r e . W i t hO p e n S S L ,p u b l i ck e y sa r ee a s i l yd e r i v e df r o mp r i v a t e k e y s ,s ob e f o r ey o uc r e a t eac e r t i f i c a t eo rac e r t i f i c a t er e q u e s t ,y o u n e e dt oc r e a t eap r i v a t ek e y . P r i v a t ek e y sa r eg e n e r a t e dw i t h' o p e n s s lg e n r s a 'i fy o uw a n taR S A p r i v a t ek e y ,o r' o p e n s s lg e n d s a 'i fy o uw a n taD S Ap r i v a t ek e y . F u r t h e ri n f o r m a t i o no nh o wt oc r e a t ep r i v a t ek e y sc a nb ef o u n di n a n o t h e rH O W T O< k e y s . t x t ? > . T h er e s to ft h i st e x ta s s u m e sy o uh a v e ap r i v a t ek e yi nt h ef i l ep r i v k e y . p e m .

3 .C r e a t i n gac e r t i f i c a t er e q u e s t T oc r e a t eac e r t i f i c a t e ,y o un e e dt os t a r tw i t hac e r t i f i c a t e r e q u e s t( o r ,a ss o m ec e r t i f i c a t ea u t h o r i t i e sl i k et op u t i t ," c e r t i f i c a t es i g n i n gr e q u e s t " ,s i n c et h a t ' se x a c t l yw h a tt h e yd o , t h e ys i g ni ta n dg i v ey o ut h er e s u l tb a c k ,t h u sm a k i n gi ta u t h e n t i c a c c o r d i n gt ot h e i rp o l i c i e s ) . Ac e r t i f i c a t er e q u e s tc a nt h e nb es e n t t oac e r t i f i c a t ea u t h o r i t yt og e ti ts i g n e di n t oac e r t i f i c a t e ,o ri f y o uh a v ey o u ro w nc e r t i f i c a t ea u t h o r i t y ,y o um a ys i g ni ty o u r s e l f ,o r i fy o un e e das e l f s i g n e dc e r t i f i c a t e( b e c a u s ey o uj u s tw a n tat e s t c e r t i f i c a t eo rb e c a u s ey o ua r es e t t i n gu py o u ro w nC A ) . T h ec e r t i f i c a t er e q u e s ti sc r e a t e dl i k et h i s : o p e n s s lr e qn e wk e yp r i v k e y . p e mo u tc e r t . c s r N o w ,c e r t . c s rc a nb es e n tt ot h ec e r t i f i c a t ea u t h o r i t y ,i ft h e yc a n h a n d l ef i l e si nP E Mf o r m a t . I fn o t ,u s et h ee x t r aa r g u m e n t' o u t f o r m '
https://www.openssl.org/docs/HOWTO/certificates.txt 1/2

4/2/2014

https://www.openssl.org/docs/HOWTO/certificates.txt

f o l l o w e db yt h ek e y w o r df o rt h ef o r m a tt ou s e( s e ea n o t h e rH O W T O < f o r m a t s . t x t ? > ) . I ns o m ec a s e s ,t h a ti s n ' ts u f f i c i e n ta n dy o uw i l l h a v et ob em o r ec r e a t i v e . W h e nt h ec e r t i f i c a t ea u t h o r i t yh a st h e nd o n et h ec h e c k st h en e e dt o d o( a n dp r o b a b l yg o t t e np a y m e n tf r o my o u ) ,t h e yw i l lh a n do v e ry o u r n e wc e r t i f i c a t et oy o u . S e c t i o n5w i l lt e l ly o um o r eo nh o wt oh a n d l et h ec e r t i f i c a t ey o u r e c e i v e d .

4 .C r e a t i n gas e l f s i g n e dt e s tc e r t i f i c a t e I fy o ud o n ' tw a n tt od e a lw i t ha n o t h e rc e r t i f i c a t ea u t h o r i t y ,o rj u s t w a n tt oc r e a t eat e s tc e r t i f i c a t ef o ry o u r s e l f . T h i si ss i m i l a rt o c r e a t i n gac e r t i f i c a t er e q u e s t ,b u tc r e a t e sac e r t i f i c a t ei n s t e a do f ac e r t i f i c a t er e q u e s t . T h i si sN O Tt h er e c o m m e n d e dw a yt oc r e a t ea C Ac e r t i f i c a t e ,s e ec a . t x t . o p e n s s lr e qn e wx 5 0 9k e yp r i v k e y . p e mo u tc a c e r t . p e md a y s1 0 9 5

5 .W h a tt od ow i t ht h ec e r t i f i c a t e I fy o uc r e a t e de v e r y t h i n gy o u r s e l f ,o ri ft h ec e r t i f i c a t ea u t h o r i t y w a sk i n de n o u g h ,y o u rc e r t i f i c a t ei sar a wD E Rt h i n gi nP E Mf o r m a t . Y o u rk e ym o s td e f i n i t e l yi si fy o uh a v ef o l l o w e dt h ee x a m p l e sa b o v e . H o w e v e r ,s o m e( m o s t ? )c e r t i f i c a t ea u t h o r i t i e sw i l le n c o d et h e mw i t h t h i n g sl i k eP K C S 7o rP K C S 1 2 ,o rs o m e t h i n ge l s e . D e p e n d i n go ny o u r a p p l i c a t i o n s ,t h i sm a yb ep e r f e c t l yO K ,i ta l ld e p e n d so nw h a tt h e y k n o wh o wt od e c o d e . I fn o t ,T h e r ea r ean u m b e ro fO p e n S S Lt o o l st o c o n v e r tb e t w e e ns o m e( m o s t ? )f o r m a t s . S o ,d e p e n d i n go ny o u ra p p l i c a t i o n ,y o um a yh a v et oc o n v e r ty o u r c e r t i f i c a t ea n dy o u rk e yt ov a r i o u sf o r m a t s ,m o s to f t e na l s op u t t i n g t h e mt o g e t h e ri n t oo n ef i l e . T h ew a y st od ot h i si sd e s c r i b e di n a n o t h e rH O W T O< f o r m a t s . t x t ? > ,Iw i l lj u s tm e n t i o nt h es i m p l e s tc a s e . I nt h ec a s eo far a wD E Rt h i n gi nP E Mf o r m a t ,a n da s s u m i n gt h a t ' sa l l r i g h tf o ry o ra p p l i c a t i o n s ,s i m p l yc o n c a t e n a t i n gt h ec e r t i f i c a t ea n d t h ek e yi n t oan e wf i l ea n du s i n gt h a to n es h o u l db ee n o u g h . W i t h s o m ea p p l i c a t i o n s ,y o ud o n ' te v e nh a v et od ot h a t .

B yn o w ,y o uh a v ey o u rc e t i f i c a t ea n dy o u rp r i v a t ek e ya n dc a ns t a r t u s i n gt h es o f t w a r et h a td e p e n do ni t . R i c h a r dL e v i t t e

https://www.openssl.org/docs/HOWTO/certificates.txt

2/2

You might also like