forked from asterisk/asterisk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SHA-256 and SHA-512-256 as authentication digest algorithms
* Refactored pjproject code to support the new algorithms and added a patch file to third-party/pjproject/patches * Added new parameters to the pjsip auth object: * password_digest = <algorithm>:<digest> * supported_algorithms_uac = List of algorithms to support when acting as a UAC. * supported_algorithms_uas = List of algorithms to support when acting as a UAS. See the auth object in pjsip.conf.sample for detailed info. * Updated both res_pjsip_authenticator_digest.c (for UAS) and res_pjsip_outbound_authentocator_digest.c (UAC) to suport the new algorithms. The new algorithms are only available with the bundled version of pjproject, or an external version > 2.14.1. OpenSSL version 1.1.1 or greater is required to support SHA-512-256. Resolves: asterisk#948 UserNote: The SHA-256 and SHA-512-256 algorithms are now available for authentication as both a UAS and a UAC.
- Loading branch information
Showing
16 changed files
with
4,240 additions
and
545 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
contrib/ast-db-manage/config/versions/abdc9ede147d_add_fields_to_ps_auths_to_support_new_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"""Add fields to ps_auths to support new algorithms | ||
Revision ID: abdc9ede147d | ||
Revises: 801b9fced8b7 | ||
Create Date: 2024-10-27 15:26:25.165085 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'abdc9ede147d' | ||
down_revision = '801b9fced8b7' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
max_value_length = 1024 | ||
|
||
def upgrade(): | ||
op.add_column('ps_auths', sa.Column('password_digest', sa.String(max_value_length))) | ||
op.add_column('ps_auths', sa.Column('supported_algorithms_uas', sa.String(max_value_length))) | ||
op.add_column('ps_auths', sa.Column('supported_algorithms_uac', sa.String(max_value_length))) | ||
op.add_column('ps_globals', sa.Column('default_auth_algorithms_uas', sa.String(max_value_length))) | ||
op.add_column('ps_globals', sa.Column('default_auth_algorithms_uac', sa.String(max_value_length))) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column('ps_auths', 'password_digest') | ||
op.drop_column('ps_auths', 'supported_algorithms_uas') | ||
op.drop_column('ps_auths', 'supported_algorithms_uac') | ||
op.drop_column('ps_globals', 'default_auth_algorithms_uas') | ||
op.drop_column('ps_globals', 'default_auth_algorithms_uac') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.