-
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.
Merge pull request #1 from LasLabs/feature/master/initial-library
[ADD] Create Red October library
- Loading branch information
Showing
15 changed files
with
701 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ exclude_lines = | |
ignore_errors = True | ||
|
||
include = | ||
*/cfssl/* | ||
*/red_october/* | ||
|
||
omit = | ||
*/virtualenv/* | ||
|
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
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,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016 LasLabs Inc. | ||
# License MIT (https://opensource.org/licenses/MIT). | ||
|
||
from .red_october import RedOctober |
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,15 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016 LasLabs Inc. | ||
# License MIT (https://opensource.org/licenses/MIT). | ||
|
||
import requests | ||
|
||
|
||
class RedOctoberException(EnvironmentError): | ||
""" This exception is raised from errors in the RedOctober Library. """ | ||
|
||
class RedOctoberDecryptException(RedOctoberException): | ||
""" This exception is raised when there are errors decrypting a file. """ | ||
|
||
class RedOctoberRemoteException(RedOctoberException): | ||
""" This exception is raised to indicate issues returned from API. """ |
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,3 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016 LasLabs Inc. | ||
# License MIT (https://opensource.org/licenses/MIT). |
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,13 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016 LasLabs Inc. | ||
# License MIT (https://opensource.org/licenses/MIT). | ||
|
||
from enum import Enum | ||
|
||
|
||
class EnumUserRole(Enum): | ||
""" It provides possible user types. """ | ||
delete = 1 | ||
revoke = 2 | ||
admin = 3 | ||
user = revoke |
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,11 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016 LasLabs Inc. | ||
# License MIT (https://opensource.org/licenses/MIT). | ||
|
||
from enum import Enum | ||
|
||
|
||
class EnumUserType(Enum): | ||
""" It provides possible user types. """ | ||
rsa = 1 | ||
ecc = 2 |
Oops, something went wrong.