Git Product home page Git Product logo

epplib.net's Introduction

EppLib.NET

Build status

EppLib.NET is a .NET library implementing the Extensible Provisioning Protocol (EPP)

HOW TO: https://github.com/ademar/EppLib.NET/wiki

EPP (defined in RFC 5730) is a widely adopted protocol used to comunicate between a domain registrar and the different domain name registries* to provision and manage domain names, host names and contact details.

EppLib.NET provides a library that makes easy for registrars to interact with registries implementing the EPP protocol.

Our library is a complete implementation of the EPP specification. Have a look at the How to section for code examples and recipes.

  • We now include EPP extensions for CIRA (the .CA registry), Nominet (the .UK registry) and IIS (the .SE registry).

NuGet

PM> Install-Package EppLib

epplib.net's People

Contributors

ademar avatar bob-v0 avatar elizabeth-young avatar hognevevle avatar luke-dobson avatar materi avatar nerzool avatar paulwoodland avatar rose-pace avatar rpearson-catdevnull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epplib.net's Issues

Cannot remove authInfo for domain name

Case scenario: Domain name has an authInfo password, which is to be removed. This is not possible with EppLib.

According to RFC 5731 this shall be possible by using a <domain: null> element:

   -  A <domain:authInfo> element that contains authorization
      information associated with the domain object.  This mapping
      includes a password-based authentication mechanism, but the schema
      allows new mechanisms to be defined in new schemas.  A <domain:
      null> element can be used within the <domain:authInfo> element to
      remove authorization information.

EppLib still does not handle IIS cancel domain correctly

In fix #26 a workaround for clientDelete bug was implemented.
The problem also occurs when trying to get current info for a domain.

Example:

Dim getInfoDomainCmd As New IisDomainInfo(inDomain)
Dim iis_response As IisDomainInfoResponse
iis_response = iislocal.Execute(getInfoDomainCmd)

XML response: (excerpt)

<extension>
    <iis:infData xsi:schemaLocation="urn:se:iis:xml:epp:iis-1.2 iis-1.2.xsd" xmlns:iis="urn:se:iis:xml:epp:iis-1.2">
	<iis:state>active</iis:state>
	<iis:clientDelete>0</iis:clientDelete>
    </iis:infData>
</extension>

Error message:
Failed to parse '0' as boolean value in iis:clientDelete

Code in IisDomainInfoResponse.cs below.
clientDelete is handled as boolean and does not seem to be saved in any local variable:

// ClientDelete
node = children.SelectSingleNode("iis:clientDelete", namespaces);
if (node != null)
{
    bool value;
    if (!Boolean.TryParse(node.InnerText, out value))
    {
	throw new Exception(String.Format("Failed to parse '{0}' as boolean value in iis:clientDelete", node.InnerText));
    }
}

EppLib does not handle IIS cancel domain correctly

IIS (.se registry) does not support delete command for deleting domain names.
Instead an update with clientDelete = 0 or 1 is used. Values accepted are 0 / 1 and not False / True.
EppLib use False or True, which is wrong.

Example 1:

Dim newDomainCancelCmd As New IisDomainUpdate(inDomain)
newDomainCancelCmd.ClientDelete = 1       'Same result for True or "1"
Dim iis_response As DomainUpdateResponse
iis_response = iislocal.Execute(newDomainCancelCmd)

EppLib sends: (excerpt)

<extension>
	<iis:update xmlns:iis="urn:se:iis:xml:epp:iis-1.2">
		<iis:clientDelete>True</iis:clientDelete>
	</iis:update>
</extension>

Example 2:

Dim newDomainCancelCmd As New DomainUpdate(inDomain)

Dim iisExtension As New IisDomainUpdateExtension
iisExtension.ClientDelete = 1
newDomainCancelCmd.Extensions.Add(iisExtension)

Dim iis_response As DomainUpdateResponse
iis_response = iislocal.Execute(newDomainCancelCmd)

EppLib sends: (same)

<extension>
	<iis:update xmlns:iis="urn:se:iis:xml:epp:iis-1.2">
		<iis:clientDelete>True</iis:clientDelete>
	</iis:update>
</extension>

IIS response:

<epp xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd" xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <response>
        <result code="2004">
            <msg>Parameter value range error</msg>
            <extValue>
                <value>
                    <iis:clientDelete xmlns:iis="urn:se:iis:xml:epp:iis-1.2"></iis:clientDelete>
                </value>
                <reason>iis:clientDelete must be 0 or 1.</reason>
            </extValue>
        </result>
    </response>
</epp>

Object reference not set to an instance of an object.

Hey guys, I'm trying to set up the connection but I can't get past Services.Connect();.
I'm using EppLib with a .net core application and I'm getting this exception:
An unhandled exception occurred while processing the request. NullReferenceException: Object reference not set to an instance of an object. System.Net.Security.SecureChannel.EnsurePrivateKey(X509Certificate certificate)

A couple lines down in the exception it says this:
EppLib.TcpTransport.Connect(SslProtocols sslProtocols) in TcpTransport.cs
77: stream.AuthenticateAsClient(EPP_REGISTRY_COM, clientCertificates, sslProtocols, false);
EppLib.Service.Connect(SslProtocols sslProtocols) in Service.cs
39: transport.Connect(sslProtocols);
Backend.Controllers.HomeController.Index() in HomeController.cs
23: service.Connect();

Thanks in advance

Create contact does not send a authinfo when no or empty password is given.

When creating a contactCreateRequest AuthInfo is not sent. KeySystems will autogenerate a password if non is given.

I created a temp work around here:

public class ContactCreateWithAuthInfo : ContactCreate
    {
        public ContactCreateWithAuthInfo(Contact contact) : base(contact)
        {
        }

        protected override XmlElement BuildCommandElement(XmlDocument doc, XmlElement commandRootElement)
        {
            if (!string.IsNullOrEmpty(Password))
            {
                return base.BuildCommandElement(doc, commandRootElement);
            }
            Password = "dummyPasswordxyt%asd";
            var xmlElement = base.BuildCommandElement(doc, commandRootElement);
            if (xmlElement.InnerXml.Split(Password).Length != 2)
            {
                throw new Exception("More than one occurance of the password " + Password);
            }
            xmlElement.InnerXml = xmlElement.InnerXml.Replace(Password, "");

            return xmlElement;
        }
    }

Thinking that this line should be dropped?

https://github.com/CodeMakerInc/EppLib.NET/blob/master/EppLib/Entities/Contact/ContactCreate.cs#L67

EPP error: Parameter value range error

Hello,
We using EppLib.NET. Our projects about domains (transfer, renew...). It's work, no problem. But when i change our server password (on remote desktop), Epp doesn't work. I don't understand.
Error: Parameter value range error Wrong curExpDate provided.

It doesn't seems like about server password, but when i change server password, it doesn't work.
Is anyone whom i consultant about this problem?

Not possible to remove VAT number for a contact

According to IIS "EPP Rules, Policies and Protocol description" it is allowed to update the iis:vatno (in IIS extension) for a contact.

If the VAT number is to be deleted, an empty iis:vatno field must be sent (as far as I can read from the IIS docs anyway). When using EppLib with an empty iis:vatno field, the field is omitted in the xml.

Something like this would work:

IisContactUpdate.VatNumber.Remove = True

Command syntax error on Login command

Followed your example like so but receiving a 2001 response code from Nominet with the message "command syntax error":

var loginCmd = new Login("username", "password");

loginCmd.Options = new Options { MLang = "en", MVersion = "1.0" };

var services = new Services();

services.ObjURIs.Add("http://www.nominet.org.uk/epp/xml/nom-domain-2.0");
services.ObjURIs.Add("http://www.nominet.org.uk/epp/xml/nom-notifications-2.0");

loginCmd.Services = services;

var response = service.Execute(loginCmd);

Any ideas why this might be happening please?

Many thanks for a fantastic open source library! :)

EppResponse extension

I'm in the progress of implementing support for the .NO registry (Norid).

Norid provides additional details to a response in the extension element of a response. Example:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <epp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:ietf:params:xml:ns:epp-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd"> <response> <result code="2306"> <msg>Parameter value policy error</msg> </result> <extension> <conditions xmlns="http://www.norid.no/xsd/no-ext-result-1.0" xsi:schemaLocation="http://www.norid.no/xsd/no-ext-result-1.0 no-ext-result-1.0.xsd"> <condition code="EC001025" severity="info"> <msg>Command failed</msg> <details>Failed to update domain [xxxxx.no].</details> </condition> <condition code="EC003009" severity="error"> <msg>No such host</msg> <details>Host [ns01.xxxxx.no] not found in the registry.</details> </condition> </conditions> </extension> <trID> <svTRID>20160217090845633968-268jgf-regX-NORID</svTRID> </trID> </response> </epp>

EDIT: Pastebin with proper linebreaks and indentation: http://pastebin.com/mU7AWJyG

These conditions are present whenever there were errors, so ideally the conditions would be available in all response objects. It's tempting to just add the support directly in EppResponse.cs, and this would work fine for us (we don't use any of the other registries that this project supports). However, I would like to contribute my work to this project once I'm done, so I should probably find a better approach. I'm however in lack of good ideas on how to do do this in a "proper" way (without having to duplicate loads of code and altering "core" files).

For e.g. contact info responses, I have a NoridContactInfoResponseclass with ContactInfoResponseas its base class. Do I need to duplicate ContactInfoResponse, and have it use my customized version of EppResponse(NoridEppResponseas I've called it, where I've overridden ProcessExtensionNode() to fetch the condition elements).

Another example is contact creation, where I have a NoridContactCreateclass, using Entities.ContactCreate as its base.
The base of Entities.ContactCreate is ContactBase<ContactCreateResponse>.
The base of ContactCreateResponseis EppResponse.
In order to not change any of the "core files", I would need to duplicate Entities.ContactCreate and ContactCreateResponse, and make the latter use NoridEppResponseas its base to achieve my goal.

Am I right, or am I missing something? What do you suggest as the best way of doing this? Any cleaner way that I'm not seeing?

Domain Variant

Hello,
How to add domain variant for arabic domains...?

Implementing Key-Systems RRPproxy

I just wanted to say that I'm working with this fantastic library (the only one that was opensource).
I'm implementing it for the use at RRPproxy, so far it works great!

the only thing I had to remove was the client certificate, to get it working initialy.

DNSSEC

Is support for DNSSEC planned?

Nominet Domain Privacy

Are there any plans to add Domain Privacy support, we're looking at Nominet specifically. If not we will probably pick this up ourselves but don't want to start if this is already in progress

EppLib secDNS (DNSSEC) extension not handling all elements in RFC

It is now only possible to add and remove the most basic secDNS (EPP DNSSEC) elements usting EppLib.
The following examples are from http://www.rfc-editor.org/rfc/rfc5910.txt

Example use of the secDNS-1.1 DS Data Interface for a create: (EppLib handles this)

   <secDNS:dsData>
     <secDNS:keyTag>12345</secDNS:keyTag>
     <secDNS:alg>3</secDNS:alg>
     <secDNS:digestType>1</secDNS:digestType>
     <secDNS:digest>49FD46E6C4B45C55D4AC</secDNS:digest>
   </secDNS:dsData>

Example use of secDNS-1.1 DS Data Interface with option key data for a create: (Not handled in EppLib)

   <secDNS:dsData>
     <secDNS:keyTag>12345</secDNS:keyTag>
     <secDNS:alg>3</secDNS:alg>
     <secDNS:digestType>1</secDNS:digestType>
     <secDNS:digest>49FD46E6C4B45C55D4AC</secDNS:digest>
     <secDNS:keyData>
       <secDNS:flags>257</secDNS:flags>
       <secDNS:protocol>3</secDNS:protocol>
       <secDNS:alg>1</secDNS:alg>
       <secDNS:pubKey>AQPJ////4Q==</secDNS:pubKey>
     </secDNS:keyData>
    </secDNS:dsData>

Example use of the secDNS-1.1 Key Data Interface for a create: (Not handled in EppLib)

    <secDNS:keyData>
      <secDNS:flags>257</secDNS:flags>
      <secDNS:protocol>3</secDNS:protocol>
      <secDNS:alg>1</secDNS:alg>
      <secDNS:pubKey>AQPJ////4Q==</secDNS:pubKey>
    </secDNS:keyData>

An OPTIONAL secDNS:maxSigLife element is also not handled in EppLib:
<secDNS:maxSigLife>604800</secDNS:maxSigLife>

How do i use DNSSEC

Hey guys, I just want to know how to use it, does anyone have an example code snippet?
It's not in the documentation and I don't see a constructor in the SecDNS classes.

Thanks in advance

Service.Connect hangs in Windows Service

This piece of code from TcpTransport

var lenghtBytes = new byte[4];
int read = 0;

while (read < 4)
{
      read = read + stream.Read(lenghtBytes, read, 4 - read);
}

works perfectly fine in a Console app, however it gets stuck in the loop and loops forever when ran in a Windows Service with Local System.

The reason for the never ending loops is that stream.Read() doesn't receive any bytes and read is always 0.

Does anyone have a any idea why it is, and how to fix it?

How to create pfx file

hello,
var tcpTransport = new TcpTransport("epp.registry", 700, new X509Certificate("mycert.pfx", "p4ssw0rd"), true);

How to create this file mycert.pfx ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.