-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add EdDSA for SPKI and signature algorithms (#5)
* Add EdDSA to allowed SPKI and signature algorithms * Remove errant period Co-authored-by: Corey Bonnell <corey.bonnell@digicert.com>
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pyasn1-alt-modules |
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,20 @@ | ||
import binascii | ||
|
||
from pyasn1.codec.der.encoder import encode | ||
from pyasn1_alt_modules import rfc8410, rfc5280 | ||
|
||
|
||
def print_hexstr_algid_for_oid(oid): | ||
algid = rfc5280.AlgorithmIdentifier() | ||
algid['algorithm'] = oid | ||
|
||
print(algid.prettyPrint()) | ||
|
||
encoded = encode(algid) | ||
|
||
print(binascii.b2a_hex(encoded).decode('us-ascii')) | ||
print('=' * 50) | ||
|
||
|
||
print_hexstr_algid_for_oid(rfc8410.id_Ed25519) | ||
print_hexstr_algid_for_oid(rfc8410.id_Ed448) |