Chen Jian

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
统计
 

转自:https://www.weechat.org/files/doc/stable/weechat_user.en.html#irc_sasl_authentication

 SASL authentication

WeeChat supports SASL authentication, using different mechanisms:

  • plain: plain text password (default)

  • ecdsa-nist256p-challenge: challenge with public/private key

  • external: client side SSL cert

  • dh-blowfish: blowfish encrypted password (insecure, not recommended)

  • dh-aes: AES encrypted password (insecure, not recommended)

  The "gcrypt" library is required when compiling WeeChat in order to use "dh-blowfish" and "dh-aes" mechanisms (see dependencies).

Options in servers are:

  • sasl_mechanism: mechanism to use (see above)

  • sasl_timeout: timeout (in seconds) for authentication

  • sasl_fail: action to perform if authentication fails

  • sasl_username: username (nick)

  • sasl_password: password

  • sasl_key: file with ECC private key (for mechanism ecdsa-nist256p-challenge)

SASL ECDSA-NIST256P-CHALLENGE

You must generate a private key in order to authentify with the ECDSA-NIST256P-CHALLENGE mechanism (no password is required on connection).

You can generate the key with this command:

$ openssl ecparam -genkey -name prime256v1 >~/.weechat/ecdsa.pem

Get the public key (encoded as base64) with this command:

$ openssl ec -noout -text -conv_form compressed -in ~/.weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64

Connect to the server, identify (for example with "nickserv identify") and set your public key in your account, using nickserv (replace the base64 value with your public key):

/connect freenode
/msg nickserv identify your_password
/msg nickserv set pubkey Av8k1FOGetUDq7sPMBfufSIZ5c2I/QYWgiwHtNXkVe/q

Configure the SASL options in the server:

/set irc.server.freenode.sasl_mechanism ecdsa-nist256p-challenge
/set irc.server.freenode.sasl_username "your_nickname"
/set irc.server.freenode.sasl_key "%h/ecdsa.pem"

Reconnect to the server:

/reconnect freenode
posted on   Chen Jian  阅读(690)  评论(0编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 字符编码:从基础到乱码解决
历史上的今天:
2016-08-05 Python类,特殊方法, __getitem__,__len__, __delitem__
2016-08-05 Python yield 使用浅析
2014-08-05 OpenERP Web Client设置闲置有效时间
2014-08-05 OpenERP7.0中非admin帐号新增其它用户问题
2014-08-05 OpenERP登录页面调整
2014-08-05 OpenERP QWeb模板标签笔记
 
点击右上角即可分享
微信分享提示