8000 Fix client validation example key generation to use x509 format · jstacoder/twilio-python@8e47d61 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e47d61

Browse files
committed
Fix client validation example key generation to use x509 format
1 parent f0c53a3 commit 8e47d61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/client_validation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def example():
3838
key_size=2048,
3939
backend=default_backend()
4040
)
41-
public_key = key_pair.public_key().public_bytes(Encoding.PEM, PublicFormat.PKCS1)
41+
public_key = key_pair.public_key().public_bytes(Encoding.PEM, PublicFormat.SubjectPublicKeyInfo)
4242
private_key = key_pair.private_bytes(Encoding.PEM, PrivateFormat.PKCS8, NoEncryption())
4343

4444
# Register the public key with Twilio
@@ -69,4 +69,4 @@ def example():
6969

7070

7171
if __name__ == '__main__':
72-
example()
72+
example()

0 commit comments

Comments
 (0)
0