鏃犳爣棰樻枃绔爄OS鏀粯瀹濇姤閿� rsa_private read error : private key is NULL

璇ラ敊璇殑寮曡捣鍥犵礌鏈夊ソ鍑犵偣锛�

1銆佷紶閫掔殑鍙傛暟鏈夌┖鍊笺�傚湪鏀粯瀹濈殑鏀粯璇锋眰url涓紝鏌愪釜鍙傛暟鏄┖鍊笺�傝繖鏍风┖鍊煎湪缁忚繃md5绛惧悕浠ュ悗锛屾瘮瀵逛細鎶ラ敊锛屾墍浠ヨ娉ㄦ剰鎮ㄤ紶閫掕繃鏉ョ殑url涓棤绌哄�笺�傚缓璁鏌ユ偍璐墿杞︾殑鏀粯瀹濅唬鐮侊紝渚嬪锛歴ubject="shop"鑰岄潪subject= ""

2銆佺▼搴忎腑瀹夊叏鏍¢獙鐮佸~鍐欓敊璇紙璇峰姟蹇呬繚瀛樺ソ璇ョ爜锛屾硠婕忓嚭鍘绘湁鍙兘琚汉浼�犳秷鎭級銆傚湪鎮ㄦ嬁鍒颁笉鍚屾祴璇曚腑閮芥湁涓�涓猭ey鐨勫弬鏁帮紝璇ュ弬鏁颁唬琛ㄦ敮浠樺疂鐨勫畨鍏ㄦ牎楠岀爜銆備粠璐︽埛鍐呭鍒惰繃鏉ョ殑鏃跺�欙紝浼氬浣欑┖鏍硷紝璇锋秷鎭鏌ャ�備緥濡傛煇涓�涓敤鎴风殑key鏄痥XXXXXXXXXXXXXXXXXXXXXXXXXXXati锛屽鍒跺埌绋嬪簭涓璳ey=鈥� kXXXXXXXXXXXXXXXXXXXXXXXXXXXati 鈥濆浜嗙┖鏍肩殑銆�

3銆佷腑鏂囩紪鐮佺殑闂銆備笉鍚岀綉绔欓噰鐢ㄤ笉鍚岀殑涓枃缂栫爜銆傛湁utf-8.gbk,iso-8859-1绛夛紝鑰岀▼搴忎腑md5瀵逛腑鏂囩鍚嶄細涓嶄竴鏍凤紝閫犳垚鏄剧ず璇ラ敊璇�傜幇asp鐨勭▼搴忔病鏈夌洿鎺tf-8缂栫爜鐨刴d5銆侾hp鍜宩sp銆侼et绋嬪簭閮芥槸鏀寔璇ョ紪鐮佺殑锛屾偍鍙互閫氳繃鏀粯鎺ュ彛鐨劼� _input_charset = 鈥渦tf-8鈥澛� 鍙傛暟璁剧疆鍒跺畾鐨勫瓧绗﹂泦锛屽苟涓旀垜浠繑鍥為�氱煡涔熶細浣跨敤璇ュ瓧绗﹂泦锛岃В鍐充贡鐮佺殑闂銆�

4绉侀挜娌℃湁杞崲涓簆kcs8鏍煎紡

瑙e喅鏂规硶:

灏嗙閽ヨ浆鎴怭KCS8鏇挎崲涓�涓嬪師绉侀挜鍗冲彲

1銆佺敓鎴愮閽em,聽 鎵ц鍛戒护openssl genrsa -out rsa_private_key.pem 1024

2銆佺敓鎴愬叕閽�,鎵ц鍛戒护openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem

3銆佸皢RSA绉侀挜杞崲鎴怭KCS8鏍煎紡,鍛戒护鎵цopenssl pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt PHP鏈嶅姟绔瑷�璇诲彇绉侀挜涓嶉渶瑕丳KCS8杞崲銆�

你可能感兴趣的:(鏃犳爣棰樻枃绔爄OS鏀粯瀹濇姤閿� rsa_private read error : private key is NULL)